| Author |
Iterate Hashmap through struts
|
pax smith
Ranch Hand
Joined: Dec 13, 2005
Posts: 45
|
|
Hi Can anybody give me the sample code to iterate a hashmap in which I have a key and a string in the value field Thanks
|
 |
poornima balagopal
Ranch Hand
Joined: Dec 02, 2003
Posts: 83
|
|
Hi You can go through this link http://struts.apache.org/struts-action/faqs/indexedprops.html
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
<logic:iterate id="element" name="myHashMap"> Key is <bean:write name="element" property="key" /> Value is <bean:write name="element" property="value" /> </logic:iterate>
|
Merrill
Consultant, Sima Solutions
|
 |
Chris Rutkowski
Greenhorn
Joined: Jun 26, 2006
Posts: 8
|
|
What if the HashMap was contained in an ArrayList? How would you iterate through the ArrayList, and then iterate through each HashMap inside it? What's wrong with this code?
|
 |
madhus mukthas
Greenhorn
Joined: Oct 24, 2009
Posts: 2
|
|
Not able to get your logic. Instead i am posting a working code below
|
 |
 |
|
|
subject: Iterate Hashmap through struts
|
|
|