File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Guidance on organizing facelets, param names, etc.? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Guidance on organizing facelets, param names, etc.?" Watch "Guidance on organizing facelets, param names, etc.?" New topic

Guidance on organizing facelets, param names, etc.?

Chris Simons

Joined: Aug 29, 2007
Posts: 19

We have a fairly large JSF/RichFaces/Seam application. Even with a great IDE like IntelliJ, we still struggle maintaining a list of available custom parameters for our facelets, the path/name of different facelet templates, and so forth.

I was wondering if by chance anyone has come up with any nifty solutions for this problem. For example, one thing we have started doing is to use a managed bean to store our standard properties for RichFaces components. So, for example, we have a DataTableBean that contains attributes such as sortMode, rowClasses, width, and so forth.

That helped a lot, but our struggle now is with facelets, in particular ui:param. Let's say we have a number of facelets/templates; each facelet can take a number of different ui:param's that alter the layout or functionality of said facelets. As a developer, I do not know what these parameters are until I dive into each facelet and discover the names and relevant values for each.

It would be nice to have an IDE-level or even bean-level approach to resolving this issue; does anyone have any ideas?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16476

It sounds like what you're describing is "skinning".

When you have wholesale changes in layout and appearance, often the best thing to do is assign a different directory to each "skin", define the page layouts, styles and icons in there and make the skin directory name be a variable part of their resource path. It's a lot easier than trying to micro-manage resources.

Customer surveys are for companies who didn't pay proper attention to begin with.
Chris Simons

Joined: Aug 29, 2007
Posts: 19
Tim - Thanks; I suppose in a way it is a bit like skinning. I could store some of these params and properties in our Theme template, which we can access via EL (#{theme.portlet}), etc. I guess I'm still wondering a bit about the way way to organize these parameters, though, such as being able to look them up via auto-complete, rather than having to remember the name of the params.
I agree. Here's the link:
subject: Guidance on organizing facelets, param names, etc.?