I added a ajax event handler to the checks in my pageable list view like this

add(new AjaxEventBehavior("onclick") {
                        @Override
                        protected void onEvent(AjaxRequestTarget target) {
                                List list = (List) checkGroup.getModelObject();
                                Object o = item.getModelObject();
                                if(list.contains(o))
                                        list.remove(o);
                                else
                                        list.add(o);
                                //database commit
                        }
                });

Additionally I overwrote updateModel() of the check group 

                @Override
                        public void updateModel() {
                                // do nothing on purpose.
                        }

Works fine for me. But it would be helpful if there was a official solution
to achieve the same behavior.

-Conny


vermas wrote:
> 
> Hi,
> 
> I'm trying to implement checkgroup with pagination and the I need to
> know when the user clicks on the submit button as what checkboxes he
> selected on various pages.
> But it doesn't remember it. Only the current page.
> Does anybody has faced this problem and the solution for this.
> 
> Thanks
> Shalini
> 
> 

-- 
View this message in context: 
http://old.nabble.com/CheckGroup-and-AjaxPagination-tp27426507p27695188.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to