Skip to Content
Facelets
book

Facelets

by Robert Swarr
March 2007
Beginner to intermediate content levelBeginner to intermediate
101 pages
2h 41m
English
O'Reilly Media, Inc.
Content preview from Facelets

Chapter 4. Developing and Using Facelets Templates

4.1 What Are Templates?

Achieving a common look and feel is a widely shared goal of web site design. Efforts to achieve this are motivated by practical concerns such as improving the user interface experience and "branding" the site. Another major goal of development organizations is code re-use. This is also motivated by pragmatic concerns. Industry experience demonstrates that improving code re-use reduces development and maintenance costs. Facelets addresses both of these goals.

Facelets is a JSF templating framework that builds a tree of UIComponent objects. These components can be core or custom JSF components, HTML markup tags, or compositions of components. Compositions can be Facelets views that are included in a page (as in Chapter 3. Developing JSF Views with Facelets) or templates (the subject of this chapter). The important point is that Facelets renders this component tree in its entirety in the Render Response phase of the request processing lifecycle. This tight integration with JSF avoids the kind of problems that you see with JSF when you combine JSF components and HTML markup, such as a fieldset tag, where the fieldset is rendered before the components it is supposed to contain.

Facelets is a JSF templating framework with more functionality than JSP static and dynamic includes and with better JSF integration. Chapter 3. Developing JSF Views with Facelets showed you how to create a page layout using Facelets include ...

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

Java™ Performance

Java™ Performance

Charlie Hunt, Binu John
JavaServer Faces

JavaServer Faces

Hans Bergsten
Core JavaServer™ Faces

Core JavaServer™ Faces

David Geary, Cay S. Horstmann

Publisher Resources

ISBN: 9780596529246Publisher SupportErrata PageSupplemental Content