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 html:option not selected 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 "html:option not selected " Watch "html:option not selected " New topic
Author

html:option not selected

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
hi good day to all,

i have a selection as below :



and i have use below code to preset the value before form display, so that it will display the user selected option, but seem it doesn't select the selected option



for your information, i define the pre_select_baju in String type

when i display the result out from retListObj.getPre_select_baju() , it give me correct result , say it is "1" , but it doesn't show me the selected option in drop-down list

anyone can help on this ? what wrong on my code ?

thank you for guidance
[ November 22, 2006: Message edited by: Nakata kokuyo ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You must use Struts tags if you want the select box to be tied to the value of the ActionForm property. Example:


[ November 23, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
oh my god , can't believe it is not in struts html tag , i might need more sleep
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:option not selected
 
Similar Threads
problem with multi select box with horizontal scroll bar
List choices.......
doubt in scriplets
Only Numeric value allowed
Javascript Problem While Displaying In IE