• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HashMap in taglib

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How can i iterate my hashmap using taglib.

Thanks,
Saumil
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by saumil baxi:

How can i iterate my hashmap using taglib.

Saumil



Pass the value of the hashmap to the tag handler class and in the tag handler class you write the java code to iterate through the map....
Make sure your tag handler class has the Bean style setter method as that of the attribute name in your tag.

Hope this helps..
[ November 25, 2008: Message edited by: Sudipto Shekhar ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What taglib? If you are talking about the JSTL, the <c:forEach> action is what you want.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator




Pass the value of the hashmap to the tag handler class and in the tag handler class you write the java code to iterate through the map....
Make sure your tag handler class has the Bean style setter method as that of the attribute name in your tag.




Can we do it in this way?
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could, but JSTL has a tag that will do it for you already. As Bear metntioned, the <c:forEach> tag.

What exactly are you trying to do?
 
saumil baxi
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks..
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic