Skip to Main Content
Mastering JavaServer Faces 2.2
book

Mastering JavaServer Faces 2.2

by Anghel Leonard
June 2014
Intermediate to advanced content levelIntermediate to advanced
578 pages
12h 2m
English
Packt Publishing
Content preview from Mastering JavaServer Faces 2.2

JSF factories

The following note is a good point to start for the last part of this chapter, which is dedicated to JSF factories. In JSF, the factories are initialized by FactoryFinder, which recognizes if a custom factory has a delegating constructor—a one argument constructor for the type of the factory.

Note

This is useful when we want to wrap standard factory from JSF, because FactoryFinder will pass in the previously known factory, usually the built-in one. Factory instances are obtained as follows:

XXXFactory factory = (XXXFactory)    FactoryFinder.getFactory(FactoryFinder.XXX_FACTORY);

For example, RenderKitFactory can be found using the following code:

RenderKitFactory factory = (RenderKitFactory)FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaServer Faces

JavaServer Faces

Hans Bergsten

Publisher Resources

ISBN: 9781782176466Supplemental Content