This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists" Watch "In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists" New topic
Author

In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists

pragya ranjan
Greenhorn

Joined: May 13, 2009
Posts: 1
How to iterate over values of hashmap which are arraylist of arraylists using <logic:iterate> ?
We are getting the error as "cannot create iterator for this collection"
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Hi Pragya, welcome to javaranch!

Can you please post the source code which you are using. I think you should not face any problems. When you iterate over a HashMap, the Map.Entry is placed on the value stack. Then you can iterate over the values which will again be an ArrayList, so the array list will be placed on the value stack. Then again you can iterate over that array list using another iterator tag and so on...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists
 
Similar Threads
Nested logic:iterate
how to use logic:iterate for ArrayLists withing Collection
using item in arraylist as order
I need help, with logic:iterate in HashMap
iterating over a HashMap containing ArrayList as value