wood burning stoves 2.0*
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
JavaRanch » Java Forums » Java » JSF
Bookmark "How should we share regions in JSF." Watch "How should we share regions in JSF." New topic
Author

How should we share regions in JSF.

Sanjeev Chauhan
Greenhorn

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.

Thanks
Sanjeev.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How should we share regions in JSF.