I have a multiple select box, which upon previous information entered is populated and then selections can be made. Right now it is being populated but not in the exact way as I intended.
In my JSP it is setup as:
<html:select property="fields" multiple="true" style='width:200px;'>
<html:options property="fields"/>
</html:select>
In my Form class “fields” is an ArrayList that in my Action class I add values too. What I want to be able to do is have those values be the choices for the box, and then be able to read whatever values the user selects from that box. It seems right now that the values are being put in there but are also being “selected”. I figure what I have will just need some tweaking but I’m a little confused.
Thanks for the help
I was able to get this partway working:
Where fieldsOptions is an ArrayList I add values to in my Action class, and fields is a String[] in my form, my problem now is after I select options I want to be able to see these selections and I assumed they would just be put in “fields” but it doesnt seem that is the case, am I maybe just not accesting it right.