Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the best way to include JSF files within a given file

 
Robin Sharma
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!

What is the best possible way to modularize a typical JSF application and include multiple JSF files within a file? I understand that existing solutions like <jsp:include>/Tiles etc have several shortcomings.

Also, is there a pure-JSF solution to this problem?

Thanks.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which shortcomings exactly are you talking about?

For that matter, I use jsp:include only.
 
Robin Sharma
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bauke Scholtz:
Which shortcomings exactly are you talking about?

For that matter, I use jsp:include only.


Hi Bauke!

Well, the following are the shortcomings i could see with the "jsp:include" approach when employed with JSF:
1. No parameterization
2. Same managed beans everywhere it�s used
3. "jsp:param" doesn�t work with JSF technology

"c:import" also, pretty much, has all the same problems.

Hope i have made myself clear.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. No parameterization
Use f:attribute in the f:subview.
2. Same managed beans everywhere it�s used
I don't understand the problem, can you please clarify?
3. "jsp:param" doesn�t work with JSF technology
Use f:attribute or h:inputHidden.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like Facelets. It's a lot like Tiles, but (for me, anyway), less frustrating. Plus Facelets puts out more intelligent error messages than straight JSF does.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which error messages are you goaling? If you means validation of conversion errors, all of those default JSF error messages are customizable using propertiesfiles. Even, since JSF 1.2 you can define it in the UIInput component itself using the attributes converterMessage, requiredMessage and validatorMessage.
[ October 12, 2006: Message edited by: Bauke Scholtz ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic