com.sun.facelets.compiler.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsf-facelets Show documentation
Show all versions of jsf-facelets Show documentation
Facelets is an open source alternative view handler technology for JavaServer Faces (JSF).
The newest version!
Facelet compiler package, not for extension.
{@link com.sun.facelets.compiler.Compiler Compilers} are used in conjunction with a
{@link com.sun.facelets.FaceletFactory FaceletFactory} implementation.
You may register multiple {@link com.sun.facelets.tag.TagLibrary TagLibraries} and
{@link com.sun.facelets.tag.TagDecorator TagDecorators} in order to define how the
document will be parsed with the Compiler instance. TagLibraries packaged with Facelets
will be loaded for you automatically and bound to their appropriate namespaces.
Compiler compiler = new SAXCompiler();
compiler.setTrimmingWhitespace(true);
compiler.addTagLibrary(new MyTagLibrary());
String alias = "index.html";
URL url = faces.getExternalContext().getResource(alias);
FaceletHandler handler = compiler.compile(url, alias);
A Compiler instance may be used multiple times and is thread safe for compilation.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy