Page Edited :
WICKET :
How to use Ajax paging with DataView
How to use Ajax paging with DataView has been edited by RĂ¼diger Schulz (Feb 05, 2007). Content:Table of contents Initial situation: Paging done without AjaxSay you have a page with a PagingNavigator and a DataView. DataView dataView = new MyDataView("dataView"); add(dataView); PagingNavigator pager = new PagingNavigator("pager", dataView); add(pager); Adding AjaxNow you want to do the paging be done via Ajax. But simply replacing the PagingNavigator with a AjaxPagingNavigator won't do it - the Page will be updated, but the DataView won't. To accomplish this, you need to do the following:
final WebMarkupContainer dataContainer = new WebMarkupContainer("dataContainer"); dataContainer.setOutputMarkupId(true); add(dataContainer); DataView dataView = new MyDataView("dataView"); dataContainer.add(dataView); AjaxPagingNavigator pager = new AjaxPagingNavigator("pager", dataView) { @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.addComponent(dataContainer); } }; dataContainer.add(pager); |
Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request
Unsubscribe or edit your notifications preferences
Unsubscribe or edit your notifications preferences