jQuery in Action, 3rd edition
The moose likes JSF and the fly likes How should we share regions in JSF. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How should we share regions in JSF." Watch "How should we share regions in JSF." New topic

How should we share regions in JSF.

Sanjeev Chauhan

Joined: Jan 02, 2011
Posts: 1
I have to create two pages and both pages are different and they show different content but one section of page needs to show same UI. I don't want to recode complete UI in both page. How can I create a common UI and share it on both pages.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17151

If you are using Facelets, you can create a Facelets Component and use the ui:include tag to include the component on the 2 pages.

I do this all the time, as well as its opposite, where I repeat the same component (with minor alterations) more than one time on a page.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: How should we share regions in JSF.
It's not a secret anymore!