File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

iterate through HashMap containing ArrayLists

Chris Rutkowski
Greenhorn

Joined: Jun 26, 2006
Posts: 8
Hello,

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?
 
wood burning stoves
 
subject: iterate through HashMap containing ArrayLists
 
Similar Threads
Dynamically Allocate Array lists to options in a dropdown for struts JSP
how to populate dropdown box dynamically
How to create a h:selectOneMenu with a default value?
Displaying inputfield or dropdownbox depending on condition
how to use logic:iterate for ArrayLists withing Collection