File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes What is the best way to include JSF files within a given file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "What is the best way to include JSF files within a given file" Watch "What is the best way to include JSF files within a given file" New topic
Author

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

Robin Sharma
Ranch Hand

Joined: Aug 24, 2005
Posts: 76
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.


DW
There is always a bug :-)
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Which shortcomings exactly are you talking about?

For that matter, I use jsp:include only.
Robin Sharma
Ranch Hand

Joined: Aug 24, 2005
Posts: 76
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the best way to include JSF files within a given file