List of usage examples for org.springframework.beans.support PagedListHolder getNrOfElements
public int getNrOfElements()
From source file:de.iteratec.iteraplan.presentation.dialog.GuiSearchController.java
/** * Calculates/sets the page size and calls further calculation, if a navigation action has been performed. *//* w w w .j a v a 2 s . com*/ private void performPaginationCalculation(T dialogMemory, PagedListHolder<?> results) { int pageSize = (dialogMemory.getPageSize() > 0) ? dialogMemory.getPageSize() : results.getNrOfElements(); results.setPageSize(pageSize); if (dialogMemory.isNextPageToShow() != null && dialogMemory.isNextPageToShow().booleanValue()) { // for navigation actions with changed page number (e.g. goto first, last, next, previous, column sort) choosePageToShow(dialogMemory, results); } else { results.setPage(dialogMemory.getCurrentPageNumber()); } }