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 JSF TreeMap Iteration Problem Using JSTL  In XHTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF TreeMap Iteration Problem Using JSTL  In XHTML" Watch "JSF TreeMap Iteration Problem Using JSTL  In XHTML" New topic
Author

JSF TreeMap Iteration Problem Using JSTL In XHTML

VijayAnand Venkateswaran
Greenhorn

Joined: Aug 04, 2008
Posts: 10
Dear All,
I have a Map[key,value] In My Action Class.Now I try to print the key followed by corresponding values In My XHTML Page Using JSTL 1.2 ,JSF 1.2.
The Below Snippet Does not print AnyThing. I had tested in My Action Class by printing Map's Size its not empty.In the beforePhase event i call a method that sets value to the Map.



Where as when i try to print Map As it is All the key & Values Of Map gets Printed.




What I Want to Do In My xhtml Page Is :



The Same I achieved In My Plain Jsp Page By doing like this..


Is it Possible to the Same Type Of Stuff In JSF Or Not??
Please Help Me.


Ship Is Safe at Shore,But its not Built For That
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

JSF has actual menu and tree tags to do that. Not in the core tagset, but in the various extensions like Tomahawk, RichFaces, IceFaces, and so forth.

As a general rule, you shouldn't put JSTL tags in a JSF view. You shouldn't have to. And in the case where you're actually putting logic JSTL in the view, you shouldn't. Period. It violates MVC.


Customer surveys are for companies who didn't pay proper attention to begin with.
VijayAnand Venkateswaran
Greenhorn

Joined: Aug 04, 2008
Posts: 10
Dear Tim,
Thanks for the Reply.I am aware of the Fact that i am Violating MVC,but from the requirement perspective i want to Know its possible or not with JSTL AND JSF,because i achived it using Plain JSP.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

VijayAnand Venkateswaran wrote:Dear Tim,
Thanks for the Reply.I am aware of the Fact that i am Violating MVC,but from the requirement perspective i want to Know its possible or not with JSTL AND JSF,because i achived it using Plain JSP.


Well, if you tried, you could probably intermix COBOL code in with JSF. But just because you can do something doesn't mean it's a good idea.

Every framework tends to influence the shape of its projects. Good frameworks are flexible enough that the end user can't tell which framework is actually being used, and JSF is fairly good about that (except for the URL issues).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF TreeMap Iteration Problem Using JSTL In XHTML
 
Similar Threads
struts dynavalidatorBean with HashMap & JSTL
JSTL and Results
How to use Break / exist statement here in foreach (JSTL)
Iterating over Map using JSTL
HashMap Output to Datatable