I have a form in a Struts 1.2.7 app that displays a dynamic list of html:checkbox fields, all having the same property value (property=choseRole), which I present using a c:forEach tag. I wish to apply validation to this set of checkboxes, and I am currently using the Validator plugin on all forms in the app. I have a formbean that extends the ValidatorForm for this particular form.
I have two questions:
1) How do I represent choseRole as a field in the formbean? and
2) How do I get the validator to see this multivalued property?
I need some kind of dynamic value, as the list of checkboxes can change in size. I have tried ArrayList, Vector, etc. without success. I also tried using multibox instead of checkbox.
I can get the validator to work by using a String value (just to test the 'required' validation) but if more than one checkbox is selected, only one returns if other fields of the form fail the validation test.
Any guidance or insight would be appreciated... thanks!
Regards,
--Chris
|
BEGIN:VCARD VERSION:2.1 X-GWTYPE:USER FN:Becker, Christopher TEL;WORK:(516)803-3921 ORG:;Corporate Information Systems TEL;PREF;FAX:(516)803-6115 EMAIL;WORK;PREF:[EMAIL PROTECTED] N:Becker;Christopher TITLE:Sr., Programmer/Analyst ADR;DOM;WORK;PARCEL;POSTAL:;;;;New York LABEL;DOM;WORK;PARCEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Becker, Christopher=0A= New York END:VCARD
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]