The total number of items
The total number of items
The sort headers: pairs of column labels, and column identifier objects of type C.
The items displayed on the current page
The items displayed on the current page
Calculates the current page number, based on the value of 'first.
Calculates the current page number, based on the value of 'first.'
The record number this page starts at.
The record number this page starts at. Zero-based.
How many items to put on each page
How many items to put on each page
Calculates the number of pages the items will be spread across
Calculates the number of pages the items will be spread across
Get the current sort state: Pair of (column index, ascending?)
Set the current sort state: Pair of (column index, ascending?)
Returns a new SortState based on a column index.
Returns a new SortState based on a column index. If the paginator is already sorted by that column, it toggles the direction; otherwise the direction is ascending. Note that this method does not alter the sort state in the paginator; it only calculates the direction toggle. Example usage: sortedPaginator.sort = sortedPaginator.sortedBy(columns.indexOf(clickedColumn))
Returns a list of page numbers to be displayed in 'zoomed' mode, i.
Returns a list of page numbers to be displayed in 'zoomed' mode, i.e., as the page numbers get further from the current page, they are more sparse.
In many situations you'll want to sort things in your paginated view.
SortedPaginator
is a specialized paginator for doing such tasks.T: The type of the elements, accessed via def page within the listing snippet C: The type of the columns, used to specify sorting