Class Pagination


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

      Constructors 
      Constructor Description
      Pagination()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long getPages​(long items, long itemsPerPage)
      Calculate the total number of pages.
      static java.lang.String getPagination​(long page, long itemsPerPage, long pages, boolean bShowAll, java.lang.String additionalParams)
      Builds a pagination HTML text block.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.lang.String getPagination​(long page,
                                                     long itemsPerPage,
                                                     long pages,
                                                     boolean bShowAll,
                                                     java.lang.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