This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Auto pre-selection of drop down boxes. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Auto pre-selection of drop down boxes." Watch "Auto pre-selection of drop down boxes." New topic
Author

Auto pre-selection of drop down boxes.

Thillai Sakthi
Ranch Hand

Joined: Jun 17, 2000
Posts: 102
Hi All:
Need your help pls.
I have a drop down box which gets its values from db. This is okay for create screen, but for edit screen, I wish to pre-select the value in db in the dd box along with other values. How do I do this struts? The examples I am seeing are all hard-coded examples......

Can you please help?


Regards,
Shakthi
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Set the desired value in your ActionForm. This will return the desired value when the dropdown's get method is called on the ActionForm.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Auto pre-selection of drop down boxes.
 
Similar Threads
Dynamic Drop down based on another value in the same form
Display Check Boxes & Dropdowns in Struts with search results
Drop down box
Populating text area
JSP page getting values from DB