Package fr.paris.lutece.util.html
Class AbstractPaginator<E>
java.lang.Object
fr.paris.lutece.util.html.AbstractPaginator<E>
- Type Parameters:
E- the type
- All Implemented Interfaces:
IPaginator<E>,Serializable
- Direct Known Subclasses:
DelegatePaginator,Paginator
Abstract Paginator
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the previous page linkintReturns the number of items in the collectionintGets the items count per page.static intgetItemsPerPage(jakarta.servlet.http.HttpServletRequest request, String strParameter, int nCurrent, int nDefault) Gets the number of items per page from a request parameterGet the parameter name of theitems_per_pageGet First labelGet Item Count labelGet Item Count per page labelGet First labelGet Next labelGet Previous labelReturns the previous page linkReturns the previous page linkintReturns the current page indexstatic StringgetPageIndex(jakarta.servlet.http.HttpServletRequest request, String strParameter, String strCurrentPageIndex) Gets the new page index from a request parameterintGets the number of pagesReturns Pages LinksReturns the previous page linkintReturns the index of the last item of the current page rangeintReturns the index of the first item of the current page rangevoidsetItemsPerPageParameterName(String strItemsPerPageParameterName) Set the parameter name of theitems_per_pageMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.paris.lutece.util.html.IPaginator
getPageItems, getPageItems
-
Field Details
-
PARAMETER_PAGE_INDEX
Default value for Page Index Parameter- See Also:
-
PARAMETER_ITEMS_PER_PAGE
Default value for Items Per Page Parameter- See Also:
-
LABEL_FIRST
- See Also:
-
LABEL_PREVIOUS
- See Also:
-
LABEL_NEXT
- See Also:
-
LABEL_LAST
- See Also:
-
-
Constructor Details
-
AbstractPaginator
public AbstractPaginator()
-
-
Method Details
-
getPageCurrent
public int getPageCurrent()Returns the current page index- Specified by:
getPageCurrentin interfaceIPaginator<E>- Returns:
- The current page index
-
getFirstPageLink
Returns the previous page link- Specified by:
getFirstPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getPreviousPageLink
Returns the previous page link- Specified by:
getPreviousPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getLastPageLink
Returns the previous page link- Specified by:
getLastPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getItemsPerPage
public int getItemsPerPage()Gets the items count per page.- Specified by:
getItemsPerPagein interfaceIPaginator<E>- Returns:
- items count per page.
-
getNextPageLink
Returns the previous page link- Specified by:
getNextPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getPagesLinks
Returns Pages Links- Specified by:
getPagesLinksin interfaceIPaginator<E>- Returns:
- Pages Links
-
getLabelFirst
Get First label- Specified by:
getLabelFirstin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelPrevious
Get Previous label- Specified by:
getLabelPreviousin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelNext
Get Next label- Specified by:
getLabelNextin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelLast
Get First label- Specified by:
getLabelLastin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelItemCount
Get Item Count label- Specified by:
getLabelItemCountin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelItemCountPerPage
Get Item Count per page label- Specified by:
getLabelItemCountPerPagein interfaceIPaginator<E>- Returns:
- The Label
-
getItemsPerPageParameterName
Get the parameter name of theitems_per_page- Specified by:
getItemsPerPageParameterNamein interfaceIPaginator<E>- Returns:
- the parameter name
-
setItemsPerPageParameterName
Set the parameter name of theitems_per_page- Specified by:
setItemsPerPageParameterNamein interfaceIPaginator<E>- Parameters:
strItemsPerPageParameterName- the parameter name
-
getPagesCount
public int getPagesCount()Gets the number of pages- Specified by:
getPagesCountin interfaceIPaginator<E>- Returns:
- the number of pages
-
getRangeMin
public int getRangeMin()Returns the index of the first item of the current page range- Specified by:
getRangeMinin interfaceIPaginator<E>- Returns:
- The index of the first item of the current page range
-
getRangeMax
public int getRangeMax()Returns the index of the last item of the current page range- Specified by:
getRangeMaxin interfaceIPaginator<E>- Returns:
- The index of the last item of the current page range
-
getItemsCount
public int getItemsCount()Returns the number of items in the collection- Specified by:
getItemsCountin interfaceIPaginator<E>- Returns:
- The number of items in the collection
-
getItemsPerPage
public static int getItemsPerPage(jakarta.servlet.http.HttpServletRequest request, String strParameter, int nCurrent, int nDefault) Gets the number of items per page from a request parameter- Parameters:
request- The HTTP requeststrParameter- The request parameter namenCurrent- The current number of itemsnDefault- The default number of items- Returns:
- The new number of items
-
getPageIndex
public static String getPageIndex(jakarta.servlet.http.HttpServletRequest request, String strParameter, String strCurrentPageIndex) Gets the new page index from a request parameter- Parameters:
request- The HTTP requeststrParameter- The request parameter namestrCurrentPageIndex- The current page index- Returns:
- The new page index
-