A Form with many Checkboxes

"Meade, Joseph L" <[email protected]> Wed, 19 Feb 2003 12:25:11 -0500
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <A594A186D0C36944AF95B53D907250F103DCC434@HSCEMAIL1.hscs.virginia.edu>
Tapestry Gurus,

I need some help with the paradigm shift.

I've got a form with an arbitrary number of related checkboxes.  The =
value of each is an int corresponding to a String label.  (illnessName =
and illnessID)

In the servlet paradigm, I would name them all the same thing and call =
something like this in the form listener:
String[] illnessIDs =3D request.getParameterValues("illness");

But, it seems in Tapestry that you need a specific boolean attribute for =
each checkbox?  That's tough when you don't know how many you will have =
or what they will be called.

What am I missing?  How can I receive a collection of values =
corresponding to the checked boxes?  I know the Checkbox component =
accepts informal parameters, so I have set a value for each, but I can't =
see how to retrieve it once the form is submitted.

Thanks for your help.



Joe Meade
[email protected]



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge