Two Laptop Bag*
The moose likes Other Application Frameworks and the fly likes Spring: Populating select boxes based on data in collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring: Populating select boxes based on data in collection" Watch "Spring: Populating select boxes based on data in collection" New topic
Author

Spring: Populating select boxes based on data in collection

Sushma Lakshmi
Greenhorn

Joined: Dec 21, 2007
Posts: 5
Hi
Can anyone please provide pointers on how to populate drop down select boxes based on values set in collections. Any code snippet that depicts how the state of the selected option can be retained would be great.

This is my first spring webapp, and my current workaround is to have the html <select><option>...., retrieve the value in the controller and set it in the command. This value is retrieved in the jsp using scriptlets and renderd back. I do realize that this is not the most optimal solution so any pointers will be appreciated.


Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring: Populating select boxes based on data in collection
 
Similar Threads
Question on Select boxes
Setting Font for select or option
Validating a Form element.
Date and Month validation in JSP
html:options horrible default settings