One thing I learned today is "there is no selected property in
<html:option>
like plain old option" , we can give value in
<html:select>
that matches the value against each option and if match found marks the option selected.
but I want to make multiple options pre-selected on page load(am using
<html:select multiple="true">
How can it be achieved?
Implement the following:
}
And use
String[]
array name as a property name for thathtml:select
property form bean property. And the name of that array as a property of thathtml:select
in jsp page.You will ultimatly gate the all selected values un the that string array of form bean.