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 how to do a Pre-selected drop down in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to do a Pre-selected drop down in Struts" Watch "how to do a Pre-selected drop down in Struts" New topic
Author

how to do a Pre-selected drop down in Struts

kay lin
Ranch Hand

Joined: May 20, 2004
Posts: 132
Hi All:
Just a quick question, would any body happen to know how to do a pre-selected drop down box in struts?

for example,


and I would like to have one of the values in the "PROVINCES_STATES" collection to show up as selected, how do i do that, please let me know

Many Thanks
Charles Hasegawa
Ranch Hand

Joined: May 22, 2003
Posts: 117
If the form bean with the stateOrProvince has the this value already set, Struts will select the correct value.
Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
Originally posted by dog lin:
Just a quick question, would any body happen to know how to do a pre-selected drop down box in struts?
Set value for the select property of the form-bean before the page is called, a fronting action is probably the best bet.

HTH.

Kinjal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to do a Pre-selected drop down in Struts
 
Similar Threads
dynamic value to be submitted to form beans
Dynamic Population of Drop Down List using AJAX
Param passing in link, prepopulation and javascript
enable/disable drop down
On htm:multibox