There is a similar question on this site asking for how to set the default vaule for an HTML object.
This relies on setting a "value"
tag for an individually-listed <option>
, but I am using an optionsCollection
, with a pre-set list of options.
<html:select property="optionsList">
<html:optionsCollection name="lutOptions"/>
</html:select>
I tried indicating the desired option
to be selected
, but it doesn't appear to work. Instead, it just creates a new option for the list at the bottom.
<option selected="selected">desired option</option>
How do I set one of the options from the lutOptions
list to be the default option for my optionsCollection
object?