The Jasper wrote:
hi,
I think I shoul've looked more closely at your question. There are 2
problems I see. One is you want to make sure at least one checkbox is
checked. This could be done with validwhen. The other is that checkbox
values are only sent if checked, otherwise they are null. I don't know
how you would combine this with html:multibox, but with multiple
checkbox fields you should be able to check that at least one is
selected. I haven't gone any deeper than that. Maybe a custom
validator would work better for you, but I think it can be done with
the standard validators.
With multibox, all the checkboxes have the same name:
<checkbox name="myCheckbox" value="A"> A</checkbox>
<checkbox name="myCheckbox" value="B"> B</checkbox>
So if none are checked, the property in the ActionForm will be
String[0]. If there's a way of checking array lengths in the validwhen
validator, that's all he should need, but I don't know, as I've never
done it myself.
- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]