private static final Logger logger = Logger.getLogger(ApplicationRenderer.class.getName());
public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
ResponseWriter writer = facesContext.getResponseWriter();
Application application = (Application) component;
ResourceHolder resourceHolder = ResourceUtils.getResourceHolder(facesContext);
String themeRelativePath = "/jquery/plugins/jqtouch/themes/" + application.getTheme();
String themeRealPath = ResourceUtils.getResourceURL(facesContext, themeRelativePath);
writer.startElement("html", null);
writer.startElement("head", null);
renderCSSDependency(facesContext, "/jquery/plugins/jqtouch/jqtouch.min.css");
renderCSSDependency(facesContext, themeRelativePath + "/theme.min.css");
for(String resource : resourceHolder.getResources()) {
if(resource.endsWith("css"))
renderCSSDependency(facesContext, resource);
else if(resource.endsWith("js"))
renderScriptDependency(facesContext, resource);
else