File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes iterate through HashMap containing ArrayLists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "iterate through HashMap containing ArrayLists" Watch "iterate through HashMap containing ArrayLists" New topic

iterate through HashMap containing ArrayLists

Chris Rutkowski

Joined: Jun 26, 2006
Posts: 8

I'm new to struts and have often been running into issues getting things to display correctly. Here's another instance of this.

I have a HashMap which contains Strings as keys, and ArrayLists as values. For example:

I'm iterating over a separate collection which will give me one of the key values in the previous Map. For each of these elements, I would like to display the correct ArrayList inside a dropdown box. For example, if the outside collection returns "%", I want to display a dropdown box containing "#" and "%". Can anyone help me with this?
I agree. Here's the link:
subject: iterate through HashMap containing ArrayLists
jQuery in Action, 3rd edition