Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Guidance on organizing facelets, param names, etc.?  RSS feed

 
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.
 
Bartender
Posts: 19807
93
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!