List of usage examples for org.apache.wicket.markup.html.navigation.paging IPageableItems getItemsPerPage
long getItemsPerPage();
From source file:com.schat.components.paging.bootstrap.BootstrapPagingNavigator.java
License:Apache License
private void initPageSizeChoice(final IPageableItems pageable, final PagerConfigurator configurator) { final DropDownChoice<Long> choice = new DropDownChoice<>("pageSize", configurator.getItemsPerPageValues()); choice.setDefaultModel(new PropertyModel<Long>(pageable, "itemsPerPage")); add(choice);//from ww w. j a v a 2 s .com choice.add(new AjaxFormComponentUpdatingBehavior("onchange") { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { reset(); onAjaxEvent(target); configurator.onItemsPerPageChanged(target, pageable.getItemsPerPage()); } }); }
From source file:org.cyclop.web.components.pagination.BootstrapPagingNavigator.java
License:Apache License
private void initPageSizeChoice(final IPageableItems pageable, final PagerConfigurator configurator) { final DropDownChoice<Long> choice = new DropDownChoice<>("pageSize", CHOICES); choice.setDefaultModel(new PropertyModel<Long>(pageable, "itemsPerPage")); add(choice);//from ww w . ja v a 2s . c om choice.add(new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { reset(); onAjaxEvent(target); configurator.onItemsPerPageChanged(target, pageable.getItemsPerPage()); } }); }