-
Book Overview & Buying
-
Table Of Contents
JSF 1.2 Components
By :
Including static content declared in another document is fine for view elements such as headers and footers, but what if we wanted to pass an object from one Facelet to another? The<ui:include> tag is more than a simple SSI tag; it has enhanced functionality that makes it possible to pass arbitrary data from one page to another.
Facelets supports the ability to pass parameters from one Facelet to another by nesting the<ui:param> tag inside a<ui:include> tag. Using the<ui:param> tag's name and value attributes, we can define named content that can be referenced by the included Facelet.
The next example demonstrates how to pass parameters to an included Facelet by using the<ui:param> tag within a<ui:include> tag. In this case, we include a Facelet that renders a customer list twice, and we pass different parameters to each one. In the first case, we render a list of male customers, and in the second case we...
Change the font size
Change margin width
Change background colour