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 Spring in Action this week in the Spring 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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I used html:select with a Collection of String