setObject(result.columns);
}
}
private BootstrapPagingNavigator createPager(IPageableItems pageable) {
BootstrapPagingNavigator pager = new BootstrapPagingNavigator("rowsPager", pageable, new PagerConfigurator() {
@Override
public void onItemsPerPageChanged(AjaxRequestTarget target, long newItemsPerPage) {
UserPreferences prefs = um.readPreferences().setPagerEditorItems(newItemsPerPage);
um.storePreferences(prefs);
appendTableResizeJs(target);
}
@Override
public long getInitialItemsPerPage() {
return um.readPreferences().getPagerEditorItems();
}
}) {
@Override
protected void onAjaxEvent(AjaxRequestTarget target) {
super.onAjaxEvent(target);
appendTableResizeJs(target);
}
};
resultTable.add(pager);
pager.setCurrentPage(initPage);
return pager;
}