use of com.sun.faces.facelets.compiler.Compiler in project mojarra by eclipse-ee4j.
the class FaceletTaglibConfigProcessor method process.
// -------------------------------------------- Methods from ConfigProcessor
@Override
public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] documentInfos) throws Exception {
ApplicationAssociate associate = ApplicationAssociate.getInstance(facesContext.getExternalContext());
Compiler compiler = associate.getCompiler();
for (int i = 0, length = documentInfos.length; i < length; i++) {
if (LOGGER.isLoggable(FINE)) {
LOGGER.log(FINE, format("Processing facelet-taglibrary document: ''{0}''", documentInfos[i].getSourceURI()));
}
Document document = documentInfos[i].getDocument();
String namespace = document.getDocumentElement().getNamespaceURI();
Element documentElement = document.getDocumentElement();
NodeList libraryClass = documentElement.getElementsByTagNameNS(namespace, LIBRARY_CLASS);
if (libraryClass != null && libraryClass.getLength() > 0) {
processTaglibraryClass(sc, facesContext, libraryClass, compiler);
} else {
processTagLibrary(sc, facesContext, documentElement, namespace, compiler);
}
}
}
use of com.sun.faces.facelets.compiler.Compiler in project mojarra by eclipse-ee4j.
the class ApplicationAssociate method createCompiler.
protected Compiler createCompiler(Map<String, Object> appMap, WebConfiguration webConfig) {
Compiler newCompiler = new SAXCompiler();
loadDecorators(appMap, newCompiler);
// Skip params?
newCompiler.setTrimmingComments(webConfig.isOptionEnabled(FaceletsSkipComments));
addTagLibraries(newCompiler);
return newCompiler;
}
Aggregations