aspose file tools*
The moose likes Struts and the fly likes How can I used html:select with a Collection of String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How can I used html:select with a Collection of String" Watch "How can I used html:select with a Collection of String" New topic
Author

How can I used html:select with a Collection of String

shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
How can I use html:select with a Collection of Strings?

I have a session variable that has List of states. How to populate the drop down from this

html ptions collection="listofstates" is not working


java.util.Collection list = new java.util.ArrayList();
list.add("name1");
list.add("name2");
list.add("name3");
session.setAttribute("myList", list);

html:select property="selectedItem"
html ptions collection="myList"
html:select



Pls help
[ May 15, 2007: Message edited by: shah rah ]
 
Don't get me started about those stupid light bulbs.
 
subject: How can I used html:select with a Collection of String