|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.util.html.AbstractPaginator<E>
E
- the typepublic abstract class AbstractPaginator<E>
Abstract Paginator
Field Summary | |
---|---|
protected java.util.List<E> |
_list
the actual list |
protected int |
_nItemPerPage
imtes per page |
protected int |
_nItemsCount
element count |
protected int |
_nPageCurrent
the current page |
protected java.lang.String |
_strBaseUrl
base url |
protected java.lang.String |
_strItemsPerPageParameterName
items per page parameter name |
protected java.lang.String |
_strPageIndexParameterName
page index parameter name |
static java.lang.String |
LABEL_FIRST
|
static java.lang.String |
LABEL_LAST
|
static java.lang.String |
LABEL_NEXT
|
static java.lang.String |
LABEL_PREVIOUS
|
static java.lang.String |
PARAMETER_ITEMS_PER_PAGE
Default value for Items Per Page Parameter |
static java.lang.String |
PARAMETER_PAGE_INDEX
Default value for Page Index Parameter |
Constructor Summary | |
---|---|
AbstractPaginator()
|
Method Summary | |
---|---|
java.lang.String |
getFirstPageLink()
Returns the previous page link |
int |
getItemsCount()
Returns the number of items in the collection |
int |
getItemsPerPage()
Gets the items count per page. |
static int |
getItemsPerPage(javax.servlet.http.HttpServletRequest request,
java.lang.String strParameter,
int nCurrent,
int nDefault)
Gets the number of items per page from a request parameter |
java.lang.String |
getItemsPerPageParameterName()
Get the parameter name of the items_per_page |
java.lang.String |
getLabelFirst()
Get First label |
java.lang.String |
getLabelItemCount()
Get Item Count label |
java.lang.String |
getLabelItemCountPerPage()
Get Item Count per page label |
java.lang.String |
getLabelLast()
Get First label |
java.lang.String |
getLabelNext()
Get Next label |
java.lang.String |
getLabelPrevious()
Get Previous label |
java.lang.String |
getLastPageLink()
Returns the previous page link |
java.lang.String |
getNextPageLink()
Returns the previous page link |
int |
getPageCurrent()
Returns the current page index |
static java.lang.String |
getPageIndex(javax.servlet.http.HttpServletRequest request,
java.lang.String strParameter,
java.lang.String strCurrentPageIndex)
Gets the new page index from a request parameter |
int |
getPagesCount()
Gets the number of pages |
java.util.List<PaginatorPage> |
getPagesLinks()
Returns Pages Links |
java.lang.String |
getPreviousPageLink()
Returns the previous page link |
int |
getRangeMax()
Returns the index of the last item of the current page range |
int |
getRangeMin()
Returns the index of the first item of the current page range |
void |
setItemsPerPageParameterName(java.lang.String strItemsPerPageParameterName)
Set the parameter name of the items_per_page |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.paris.lutece.util.html.IPaginator |
---|
getPageItems |
Field Detail |
---|
public static final java.lang.String PARAMETER_PAGE_INDEX
public static final java.lang.String PARAMETER_ITEMS_PER_PAGE
public static final java.lang.String LABEL_FIRST
public static final java.lang.String LABEL_PREVIOUS
public static final java.lang.String LABEL_NEXT
public static final java.lang.String LABEL_LAST
protected java.lang.String _strPageIndexParameterName
protected int _nItemPerPage
protected java.lang.String _strBaseUrl
protected java.util.List<E> _list
protected int _nPageCurrent
protected java.lang.String _strItemsPerPageParameterName
protected int _nItemsCount
Constructor Detail |
---|
public AbstractPaginator()
Method Detail |
---|
public int getPageCurrent()
getPageCurrent
in interface IPaginator<E>
public java.lang.String getFirstPageLink()
getFirstPageLink
in interface IPaginator<E>
public java.lang.String getPreviousPageLink()
getPreviousPageLink
in interface IPaginator<E>
public java.lang.String getLastPageLink()
getLastPageLink
in interface IPaginator<E>
public int getItemsPerPage()
getItemsPerPage
in interface IPaginator<E>
public java.lang.String getNextPageLink()
getNextPageLink
in interface IPaginator<E>
public java.util.List<PaginatorPage> getPagesLinks()
getPagesLinks
in interface IPaginator<E>
public java.lang.String getLabelFirst()
getLabelFirst
in interface IPaginator<E>
public java.lang.String getLabelPrevious()
getLabelPrevious
in interface IPaginator<E>
public java.lang.String getLabelNext()
getLabelNext
in interface IPaginator<E>
public java.lang.String getLabelLast()
getLabelLast
in interface IPaginator<E>
public java.lang.String getLabelItemCount()
getLabelItemCount
in interface IPaginator<E>
public java.lang.String getLabelItemCountPerPage()
getLabelItemCountPerPage
in interface IPaginator<E>
public java.lang.String getItemsPerPageParameterName()
items_per_page
getItemsPerPageParameterName
in interface IPaginator<E>
public void setItemsPerPageParameterName(java.lang.String strItemsPerPageParameterName)
items_per_page
setItemsPerPageParameterName
in interface IPaginator<E>
strItemsPerPageParameterName
- the parameter namepublic int getPagesCount()
getPagesCount
in interface IPaginator<E>
public int getRangeMin()
getRangeMin
in interface IPaginator<E>
public int getRangeMax()
getRangeMax
in interface IPaginator<E>
public int getItemsCount()
getItemsCount
in interface IPaginator<E>
public static int getItemsPerPage(javax.servlet.http.HttpServletRequest request, java.lang.String strParameter, int nCurrent, int nDefault)
request
- The HTTP requeststrParameter
- The request parameter namenCurrent
- The current number of itemsnDefault
- The default number of items
public static java.lang.String getPageIndex(javax.servlet.http.HttpServletRequest request, java.lang.String strParameter, java.lang.String strCurrentPageIndex)
request
- The HTTP requeststrParameter
- The request parameter namestrCurrentPageIndex
- The current page index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |