This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt 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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:option not selected " Watch "html:option not selected " New topic

html:option not selected

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 458
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 ]

Consultant, Sima Solutions
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 458
oh my god , can't believe it is not in struts html tag , i might need more sleep
I agree. Here's the link:
subject: html:option not selected
jQuery in Action, 3rd edition