3. Composite View Design Pattern
Contents
>
3. Facelets Concepts
> Composite View Design Pattern
Facelets is based on the Composite View Design Pattern. This means that sections of a page
or even pages themselves can be reused by other pages. The Sun Java Blueprints Catalogue
defines a composite view as follows:
"A Composite View is a view built using other reusable sub-views. A single change to
a sub-view is automatically reflected in every composite view that uses it. Furthermore, the
composite view manages the layout of its sub-views and can provide a template, making
consistent look and feel feel easier to achieve and modify across the entire
application." (
Sun Java Blueprints
Catalogue
)
What is a "Facelet"?
A "Facelet" is a reusable section of content or a sub-tree of components on a
JSF page that can itself be composed of other Facelets. In this sense, a Facelet is a
composite view element that can easily be combined with other Facelets to build a JSF view
that will be rendered to the user.
|