|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.web.action.util.lists.ListPager<T>
public abstract class ListPager<T>
This is a simple pager that can reduce a big list into paged sizes. Its designed for use within webwork actions/jsp in that it is immutable (eg one page per created ListPager) and actions can only really show one page of data per render.
You need to specify the page number you want to go to, the number of rows per page and the full list you want to page.
Constructor Summary | |
---|---|
ListPager(java.util.List<T> fullList,
int pageNo,
int rowsPerPage)
Creates a ListPager that pages a list from a certain page number. |
Method Summary | |
---|---|
protected abstract java.lang.String |
generatePageURL(int targetPageNo,
int rowsPerPage)
Each implementation of this class is expected to generate their own URLS based on the passed in page number |
java.lang.String |
getEndPageURL()
|
int |
getFromIndex()
|
int |
getFullListSize()
|
java.util.List<T> |
getList()
|
java.lang.String |
getNextPageURL()
|
int |
getPageNumber()
|
java.lang.String |
getPrevPageURL()
|
int |
getRowsPerPage()
|
java.lang.String |
getStartPageURL()
|
int |
getToIndex()
|
boolean |
hasMultiplePages()
Returns true if the pager has multiple pages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListPager(java.util.List<T> fullList, int pageNo, int rowsPerPage)
fullList
- is the full list of objectpageNo
- is a zero based indexrowsPerPage
- must be > 0Method Detail |
---|
public java.lang.String getPrevPageURL()
generatePageURL(int, int)
to
generate an URLpublic java.lang.String getNextPageURL()
generatePageURL(int, int)
to generate
an URLpublic java.lang.String getStartPageURL()
public java.lang.String getEndPageURL()
protected abstract java.lang.String generatePageURL(int targetPageNo, int rowsPerPage)
targetPageNo
- the target page numberrowsPerPage
- the rows per page
public java.util.List<T> getList()
public int getPageNumber()
public int getRowsPerPage()
public int getFullListSize()
public int getFromIndex()
public int getToIndex()
public boolean hasMultiplePages()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |