The moose likes Struts and the fly likes logic:iterate on OrderedMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:iterate on OrderedMap" Watch "logic:iterate on OrderedMap" New topic

logic:iterate on OrderedMap

Navaneeth Rao

Joined: Sep 15, 2005
Posts: 3
Has anyone tried the logic:iterate over a OrderedMap full of beans? I have a OrderedMap called "catList" in my session. This OrderedMap has a bean called CatBean with GetCatId and GetCatName methods, returning catId and catName respectively. Now, how do I use logic:iterate to iterate over the map?

Please help. Thanks.

Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
Hi Navneeth,

Its just like other java.util structures,

<logic:iterate id="var" name="formname" property="propname">
// Write the corresponding tags using var

Navaneeth Rao

Joined: Sep 15, 2005
Posts: 3
After all it was not as easy as i thought it would be. Here is a solution that worked :
I agree. Here's the link:
subject: logic:iterate on OrderedMap
It's not a secret anymore!