All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.myfaces.view.facelets.compiler.package.html Maven / Gradle / Ivy

Go to download

The private implementation classes of the Apache MyFaces Core JSF-2.3-next Implementation

There is a newer version: 4.1.0-RC2
Show newest version






Facelet compiler package, not for extension.
{@link org.apache.myfaces.view.facelets.compiler.Compiler Compilers} are used in conjunction with a
{@link org.apache.myfaces.view.facelets.FaceletFactory FaceletFactory} implementation.

You may register multiple {@link org.apache.myfaces.view.facelets.tag.TagLibrary TagLibraries} and {@link javax.faces.view.facelets.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 - 2024 Weber Informatics LLC | Privacy Policy