This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

JSF TreeMap Iteration Problem Using JSTL In XHTML  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 20643
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
VijayAnand Venkateswaran
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20643
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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).
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!