You give the same name for all checkboxes, this is obvious I think!

If you define an property as an Integer[] for example, then you receave an Array with a number of entries equal to the number of boxes checked.

I have, some weeks ago, made an basic ActionForm, and if I'm correct, when the property is only Integer the respective setter for the property is called in number of times there are boxes checked.

Nevertheless I need Validator to control the number of checks and the values.

Also regarding for your anwers, I also suspect that I have to do one validator of my own.

But I think Validator should provide validation of basic types in Array, since it accepts java.lang.Integer[].

Tnx!

Adam Hardy wrote:

You would have to roll your own I presume, since a checkbox is either checked or null. How would you check for null? It seems counter-intuitive.

Out of curiosity, how do you group a number of checkboxes?

Adam

José Fortunato H. Tomás wrote:

Hi!

Any one has an example or code using Validator for a form-bean where exists an input that is a group of checkboxes?

I need to use "required", and number of cheks checked, but until now I couldn't find any way to use validator correctly for this kind of situation.
In the current work, 99% of forms use Validator, except the ones that has groups of checkboxes. :(


Thanks!



-- José Tomás LINK Consulting SA - http://www.link.pt Av. Duque de Avila 23 5º Dto. - 1000-138 Lisboa Telf: (+351) 213 100 095 Fax: (+351) 213 100 079



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to