This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Guidance on organizing facelets, param names, etc.?

 
Chris Simons
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

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?

Thanks.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chris Simons
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic