-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
JSF 1.2 Components
By :
Sometimes, it is desirable to include content from another view element as a single UI component. This enables us, for example, to use the rendered attribute on the included content to support conditionally rendered markup more easily, and is convenient for situations where a single component is expected (such as inside the<h:panelGrid> or<f:facet> tag).
The Facelets<ui:component> tag is similar to the<ui:composition> tag. In both cases, any content outside the tag is trimmed, but in the case of the<ui:component> tag, the content will be rendered within a UI component. Let's look at some examples of using the Facelets<ui:component> tag.
The following example demonstrates that a Facelet containing a<ui:component> tag can be included just like a Facelet containing a<ui:composition> tag:
component01.jsf
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1...
Change the font size
Change margin width
Change background colour