Class Paginator<E>

java.lang.Object
fr.paris.lutece.util.html.AbstractPaginator<E>
fr.paris.lutece.util.html.Paginator<E>
Type Parameters:
E - Item of the list
All Implemented Interfaces:
IPaginator<E>, Serializable
Direct Known Subclasses:
LocalizedPaginator

public class Paginator<E> extends AbstractPaginator<E>
Paginator provides a way to display a collection of items on severals pages. This implementation requires all items
See Also:
  • Constructor Details

    • Paginator

      public Paginator(List<E> list, int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex)
      Creates a new instance of Paginator
      Parameters:
      list - The collection to paginate
      nItemPerPage - Number of items to display per page
      strBaseUrl - The base Url for build links on each page link
      strPageIndexParameterName - The parameter name for the page index
      strPageIndex - The current page index
    • Paginator

      public Paginator(List<E> list, int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex, String strItemsPerPageParameterName)
      Creates a new instance of Paginator
      Parameters:
      list - The collection to paginate
      nItemPerPage - Number of items to display per page
      strBaseUrl - The base Url for build links on each page link
      strPageIndexParameterName - The parameter name for the page index
      strPageIndex - The current page index
      strItemsPerPageParameterName - The parameter name of the number items per page
  • Method Details

    • getPageItems

      public List<E> getPageItems()
      Returns the List
      Returns:
      The List
    • getPageItems

      public List<E> getPageItems(int nPage)
      Description copied from interface: IPaginator
      Returns the List
      Returns:
      The List