Class PaginationUtil
- java.lang.Object
-
- org.silverpeas.core.web.util.viewgenerator.html.pagination.PaginationUtil
-
public class PaginationUtil extends Object
- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
formatFromFirstIndexOfItem(int nbItemsPerPage, int totalNumberOfItems, int firstItemIndexOfCurrentPage)
Centralizes the formatting of a pagniation context label.static String
formatFromFirstIndexOfItem(PaginationPage paginationPage, int totalNumberOfItems)
Centralizes the formatting of a pagniation context label.
-
-
-
Method Detail
-
formatFromFirstIndexOfItem
public static String formatFromFirstIndexOfItem(int nbItemsPerPage, int totalNumberOfItems, int firstItemIndexOfCurrentPage)
Centralizes the formatting of a pagniation context label.- Parameters:
nbItemsPerPage
- the number of items displayed in a page.totalNumberOfItems
- the total number of items that can be displayed.firstItemIndexOfCurrentPage
- the index in the list of items of the first item to display in the current page.- Returns:
- the counter as string.
-
formatFromFirstIndexOfItem
public static String formatFromFirstIndexOfItem(PaginationPage paginationPage, int totalNumberOfItems)
Centralizes the formatting of a pagniation context label.- Parameters:
paginationPage
- the pagination page.totalNumberOfItems
- the total number of items that can be displayed. in the current page.- Returns:
- the counter as string.
-
-