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

Passing parameters from one Facelet to another

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> ...

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