This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • How to use Ajax paging with DataView
Skip to end of metadata
Go to start of metadata
Table of contents

Initial situation: Paging done without Ajax

Say you have a page with a PagingNavigator and a DataView.

DataView dataView = new MyDataView("dataView");

PagingNavigator pager = new PagingNavigator("pager", dataView);

Adding Ajax

Now 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:

  • surround the PagingNavigation and the DataView with a WebMarkupContainer
  • tell the AjaxPagingNavigator to update the WebMarkupContainer
  • update your HTML to match the new component hierarchy
final WebMarkupContainer dataContainer = new WebMarkupContainer("dataContainer");

DataView dataView = new MyDataView("dataView");

AjaxPagingNavigator pager = new AjaxPagingNavigator("pager", dataView) {
	protected void onAjaxEvent(AjaxRequestTarget target) {

From a posting of Igor to the wicket-user list