You can assign AjaxFormChoiceComponentUpdatingBehavior to the group and check its model object's size in #onUpdate()
But this will fire Ajax requests for each and every click on the checkboxes. On Tue, Jul 3, 2012 at 7:09 PM, Dan12321 <[email protected]> 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). > Could help me, how can I do it? > > Thanks. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/chekbox-allow-only-5-selected-tp4650340.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
