File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 465
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: 465
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
It's not a secret anymore!