On Tue, Jul 3, 2012 at 12:09 PM, Dan12321 <wee...@centrum.cz> wrote:

> Hi,
>
> I have CheckGroup<User> group = new CheckGroup<User>("usersGroup", list);
> and in repeater I add checkbox: item.add(new Check<User>("checkboxUser",
> group));
>
> I have got 20 checkboxes, but I want to allow only 5 checkboxes select.
> When
> will be selected more than 5 checkboxes, it shows error (in feedback).
> I want to check this when the checkbox is selected (not after submitting
> form).
>


It will require JavaScript, so I'd just make it an entirely client-side
validation.  Of course, you'll still want the server-side validation to
mirror it for when the form is submitted - potentially with forced values
or JS disabled.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to