You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steven Haines <ly...@yahoo.com> on 2010/03/29 20:54:34 UTC

Checkbox Group

Hi Everyone, 

Our web developer is using checkboxes in the place of radio buttons with JavaScript that ensures that only one is selected at a time. I know how to handle radio buttons and to handle individual checkboxes, but does anyone have a good strategy for dealing with a checkbox "group"? For other sections of our site I handled this by defining a checkbox for each item and then setting the appropriate value. In this page, however, we have an unknown number of checkboxes, which makes things a bit more difficult...

Thanks
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Checkbox Group

Posted by Josh Chappelle <jc...@4redi.com>.
Take a look at the Check and CheckGroup components. You can populate your
list of items of unknown size with a ListView and put Check components
inside. Then add your ListView to a CheckGroup. When the form is submitted
the CheckGroup will have a collection of the items that were checked within
its model.

Hope this helps.

Josh

-----Original Message-----
From: Steven Haines [mailto:lygado@yahoo.com] 
Sent: Monday, March 29, 2010 1:55 PM
To: Wicket User List
Subject: Checkbox Group

Hi Everyone, 

Our web developer is using checkboxes in the place of radio buttons with
JavaScript that ensures that only one is selected at a time. I know how to
handle radio buttons and to handle individual checkboxes, but does anyone
have a good strategy for dealing with a checkbox "group"? For other sections
of our site I handled this by defining a checkbox for each item and then
setting the appropriate value. In this page, however, we have an unknown
number of checkboxes, which makes things a bit more difficult...

Thanks
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org