The moose likes Struts and the fly likes html: options tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html: options tag" Watch "html: options tag" New topic

html: options tag

kailas simha

Joined: May 29, 2002
Posts: 5
I have a list of values held in the label bean. When I create the drop down, how do I make one of the values a "default"?

For Ex, if "John", "Jill", "Jennifer" and "Kim" are the options in a drop down, how do I make (force) "Jill" to be default when the page comes up?

Thanks !
s penumudi
Ranch Hand

Joined: Nov 17, 2004
Posts: 113
I guess you will be having a action form field for that drop down box. to that form field set "Jill" as value and it will get by default selected
It is sorta covered in the JavaRanch Style Guide.
subject: html: options tag