Class Pagination


  • public class Pagination
    extends Object
    Builds a pagination HTML text block using twitter-bootstrap styles.
    • Constructor Detail

      • Pagination

        public Pagination()
    • Method Detail

      • getPages

        public static long getPages​(long items,
                                    long itemsPerPage)
        Calculate the total number of pages.
        Parameters:
        items - total number of items
        itemsPerPage - items displayed per page
        Returns:
        the total number of pages
      • getPagination

        public static String getPagination​(long page,
                                           long itemsPerPage,
                                           long pages,
                                           boolean bShowAll,
                                           String additionalParams)
        Builds a pagination HTML text block.
        Parameters:
        page - current page
        itemsPerPage - items displayed per page
        pages - total number of pages
        Returns:
        HTML text block