Re: Updating model object on AjaxFallbackDefaultDataTable page change
Hello Mark, did you manage to solve this? I'm facing the same problem and tried to implement my own navigation links (as AjaxSubmitLink) as Igor suggested. But still my checkgroup state is not preserved when changing the table pages. If you had some code example that would be a huge help. Thanks, Philip 2010/11/10 Matt Schmidt mschmid...@gmail.com Are you suggesting to override AjaxPagingNavigator.newPagingNavigationIncrementLink() and AjaxPagingNavigator.newPagingNavigationLink() and implement our own navigation links similar to AjaxPagingNavigationIncrementLink and AjaxPagingNavigationLink that do the same thing except extends SubmitLink rather than Link? Am I making that harder than it needs to be? It may help a lot if you have a code sample for something like this. On Tue, Nov 9, 2010 at 4:04 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see my last suggestion and replace navigator's links with submitlinks -igor On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt mschmid...@gmail.com wrote: Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an ajax request every time we check a box - The model object of the check group should be updated when we a) click the submit button or b) change the page of the datatable. What are we missing here? On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt mschmid...@gmail.com wrote: I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Updating model object on AjaxFallbackDefaultDataTable page change
I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt
Re: Updating model object on AjaxFallbackDefaultDataTable page change
use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt mschmid...@gmail.com wrote: I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating model object on AjaxFallbackDefaultDataTable page change
Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an ajax request every time we check a box - The model object of the check group should be updated when we a) click the submit button or b) change the page of the datatable. What are we missing here? On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt mschmid...@gmail.com wrote: I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating model object on AjaxFallbackDefaultDataTable page change
see my last suggestion and replace navigator's links with submitlinks -igor On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt mschmid...@gmail.com wrote: Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an ajax request every time we check a box - The model object of the check group should be updated when we a) click the submit button or b) change the page of the datatable. What are we missing here? On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt mschmid...@gmail.com wrote: I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating model object on AjaxFallbackDefaultDataTable page change
Are you suggesting to override AjaxPagingNavigator.newPagingNavigationIncrementLink() and AjaxPagingNavigator.newPagingNavigationLink() and implement our own navigation links similar to AjaxPagingNavigationIncrementLink and AjaxPagingNavigationLink that do the same thing except extends SubmitLink rather than Link? Am I making that harder than it needs to be? It may help a lot if you have a code sample for something like this. On Tue, Nov 9, 2010 at 4:04 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see my last suggestion and replace navigator's links with submitlinks -igor On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt mschmid...@gmail.com wrote: Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an ajax request every time we check a box - The model object of the check group should be updated when we a) click the submit button or b) change the page of the datatable. What are we missing here? On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt mschmid...@gmail.com wrote: I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org