the <html:multibox> is intended to be used when the property is represented as a
string array and you are populating it using checkboxes. In this example:
<html:multibox property="color" value="red" /> <html:multibox property="color" value="blue" />
The ActionForm property color is represented as a string array which could have zero, one, or two elements depending on what is checked. In this scenario, if the resulting array is {"blue"}, you know for sure that the red checkbox was not checked.
If you're using boolean values,
you should be using <html:checkbox/>, not <html:multibox>. Example:
<html:checkbox property="hadMeasles" /> <html:checkbox property="hadSmallpox" /> <html:checkbox property="hadMumps" />
If you set all values to false in the reset() method of your ActionForm, when
Struts populates the ActionForm ,all boxes checked will have a value of true, and those unchecked will have a value of false. In the above example, if the first checkbox is checked, the form bean's "hadMeasles" property will be true, and all others will be false, provided you have cleared them in your ActionForm's reset() method.