O'Reilly logo

JSF 1.2 Components by Ian Hlavats

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering a UI component

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.

Including a UI component

The following example demonstrates that a Facelet containing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required