Hi all. Very new to this list and struts, but using it pretty successfully
for
a project at work. Good looking framework. Now the question:
I have a form that will list anywhere from 0-9 vehicles.
I have to allow multiple selection of vehicles.
Currently I'm using <html:select multiple="true"... type
tags, but would like to use checkboxes, so would the
following work?
Create a bean with name/value pairs for each vehicle and
do a <logic:iterate... tag and generate an <html:multibox...
for each entry (the selected vehicles are an array in a form bean).
The above sounds pretty reasonable, but I'm unsure how
to get it to work. Specifically, how to get the proper value=
attribute in the multibox tag:
<!-- vehicles is a page-scope hashtable -->
<logic:iterate id="entry" name="vehicles">
** how to get the key property of 'entry' into value attrib? **
<html:multibox property="principalOperators" value="???">
<bean:write name="entry" property="value"/>
</html:multibox>
</logic:iterate>
Thanks in advance,
Carmine Lucarelli