|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.Component org.apache.wicket.MarkupContainer org.apache.wicket.markup.html.WebMarkupContainer org.apache.wicket.markup.repeater.AbstractRepeater org.apache.wicket.markup.html.list.ListView<T> org.apache.wicket.markup.html.list.PageableListView<T>
T
- Model object typepublic abstract class PageableListView<T>
PageableListView is similar to ListView but provides in addition pageable views. A PageableListView holds pageable rows of information. The rows can be re-ordered and deleted, either one at a time or many at a time.
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
PageableListView(String id,
IModel<? extends List<? extends T>> model,
int itemsPerPage)
Constructor |
|
PageableListView(String id,
List<? extends T> list,
int itemsPerPage)
Creates a pageable list view having the given number of rows per page that uses the provided object as a simple model. |
Method Summary | |
---|---|
long |
getCurrentPage()
Gets the index of the current page being displayed by this list view. |
long |
getFirstItemOffset()
|
long |
getItemCount()
Gets the total number of items this object has. |
long |
getItemsPerPage()
Gets the maximum number of rows on each page. |
long |
getPageCount()
Gets the number of pages in this list view. |
int |
getViewSize()
Based on the model object's list size, firstIndex and view size, determine what the view size really will be. |
void |
setCurrentPage(long currentPage)
Sets the current page that this list view should show. |
void |
setItemsPerPage(long itemsPerPage)
Sets the maximum number of rows on each page. |
ListView<T> |
setStartIndex(int startIndex)
Prevent users from accidentally using it. |
ListView<T> |
setViewSize(int size)
Prevent users from accidentally using it. |
Methods inherited from class org.apache.wicket.markup.html.list.ListView |
---|
getList, getListItemModel, getModel, getModelObject, getReuseItems, getStartIndex, moveDownLink, moveUpLink, newItem, onBeginPopulateItem, onPopulate, populateItem, removeLink, renderChild, renderItem, renderIterator, setList, setModel, setModelObject, setReuseItems |
Methods inherited from class org.apache.wicket.markup.repeater.AbstractRepeater |
---|
getMarkup, onBeforeRender, onRender |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PageableListView(String id, IModel<? extends List<? extends T>> model, int itemsPerPage)
id
- See Componentmodel
- See ComponentitemsPerPage
- Number of rows to show on a pagepublic PageableListView(String id, List<? extends T> list, int itemsPerPage)
id
- See Componentlist
- See ComponentitemsPerPage
- Number of rows to show on a pageListView.ListView(String, List)
Method Detail |
---|
public final long getCurrentPage()
getCurrentPage
in interface IPageable
public final long getPageCount()
getPageCount
in interface IPageable
public final long getItemsPerPage()
getItemsPerPage
in interface IPageableItems
public final void setItemsPerPage(long itemsPerPage)
setItemsPerPage
in interface IPageableItems
itemsPerPage
- the maximum number of rows on each page.public long getFirstItemOffset()
public long getItemCount()
IPageableItems
getItemCount
in interface IPageableItems
IPageableItems.getItemCount()
public int getViewSize()
ListView
getViewSize
in class ListView<T>
ListView.getViewSize()
public final void setCurrentPage(long currentPage)
setCurrentPage
in interface IPageable
currentPage
- The currentPage to set.public ListView<T> setStartIndex(int startIndex) throws UnsupportedOperationException
setStartIndex
in class ListView<T>
startIndex
- First index of model object's list to display
UnsupportedOperationException
- alwaysListView.setStartIndex(int)
public ListView<T> setViewSize(int size) throws UnsupportedOperationException
setViewSize
in class ListView<T>
size
- the view size
UnsupportedOperationException
- alwaysListView.setStartIndex(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |