Forums Register Login

HashMap in taglib

+Pie Number of slices to send: Send
Hi,
How can i iterate my hashmap using taglib.

Thanks,
Saumil
+Pie Number of slices to send: Send
 

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 ]
+Pie Number of slices to send: Send
What taglib? If you are talking about the JSTL, the <c:forEach> action is what you want.
+Pie Number of slices to send: Send
 




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?
+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
Thanks..
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1568 times.
Similar Threads
CVS Tagging using ANT
URL of the previous page
Use of css in taglib?
Creating CVS branch using ANT
Alternative to properties file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 23:32:32.