Created
September 29, 2011 19:02
-
-
Save lfryc/1251612 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private UIComponent createComponentResource(FacesContext ctx, ResourceDependency dep) { | |
Expressions exprs = expressionsMap.get(dep); | |
Application app = ctx.getApplication(); | |
String resname = exprs.getName(ctx); | |
UIComponent c = ctx.getApplication().createComponent("javax.faces.Output"); | |
c.setRendererType(app.getResourceHandler().getRendererTypeForResourceName(resname)); | |
Map<String,Object> attrs = c.getAttributes(); | |
attrs.put("name", resname); | |
if (exprs.library != null) { | |
attrs.put("library", exprs.getLibrary(ctx)); | |
} | |
if (exprs.target != null) { | |
attrs.put("target", exprs.getTarget(ctx)); | |
} | |
return c; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment