O'Reilly logo

Mastering JavaServer Faces 2.2 by Anghel Leonard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Facelets' programmatic aspects

In the second part of this chapter, we will focus more on several programmatic aspects of Facelets. We will start with a new feature of JSF 2.2 regarding FaceletFactory, which produces Facelets relative to the context of the underlying implementation.

FaceletFactory considerations

In JSF 2.0, the FaceletFactory class was not accessible via the standard API for accessing factories, FactoryFinder. This means that something like the following line was not working:

FaceletFactory faceletFactory = (FaceletFactory)
FactoryFinder.getFactory(javax.faces.view.facelets.FaceletFactory);

But starting with JSF 2.2, the preceding snippet of code should work. At least this is what the list of JSF 2.2 features said. Unfortunately, it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required