|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.repeater.AbstractRepeater
org.apache.wicket.markup.repeater.RepeatingView
org.apache.wicket.markup.repeater.RefreshingView<T>
com.inmethod.grid.common.AbstractPageableView<T>
T - row/item model object typepublic abstract class AbstractPageableView<T>
Wicket AbstractPageableView alternative that uses
IDataSource as data source. Compared to Wicket
AbstractPageableView this component allows paging
without knowing the total number of rows.
| Field Summary | |
|---|---|
static int |
UNKOWN_COUNT
Constant for unknown count of rows. |
| 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 | |
|---|---|
AbstractPageableView(String id)
Constructor. |
|
AbstractPageableView(String id,
IModel<T> model)
Constructor, |
|
| Method Summary | |
|---|---|
void |
clearCache()
clears the queryResult cache so the next use will be forced to re-initialize |
int |
getCurrentPage()
|
int |
getCurrentPageItemCount()
Returns the count of items on current page. |
protected abstract IDataSource<T> |
getDataSource()
|
protected Iterator<IModel<T>> |
getItemModels()
|
int |
getPageCount()
Gets the total number of pages this pageable object has. |
protected abstract int |
getRowsPerPage()
|
protected abstract IGridSortState |
getSortState()
|
int |
getTotalRowCount()
Returns the total count of items (sum of count of items on all pages) or UNKOWN_COUNT in case the count can't be determined. |
protected void |
onBeforeRender()
|
protected void |
onDetach()
Cleanup |
void |
setCurrentPage(int page)
Sets the a page that should be rendered. |
protected IDataSource.IQuery |
wrapQuery(IDataSource.IQuery original)
Allows to wrap created query. |
| Methods inherited from class org.apache.wicket.markup.repeater.RefreshingView |
|---|
addItems, getItemReuseStrategy, getItems, newItem, newItemFactory, onPopulate, populateItem, setItemReuseStrategy |
| Methods inherited from class org.apache.wicket.markup.repeater.RepeatingView |
|---|
newChildId, renderIterator |
| Methods inherited from class org.apache.wicket.markup.repeater.AbstractRepeater |
|---|
getMarkup, onRender, renderChild |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebPage, getWebRequest |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, 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 |
| Field Detail |
|---|
public static final int UNKOWN_COUNT
| Constructor Detail |
|---|
public AbstractPageableView(String id,
IModel<T> model)
id - model - public AbstractPageableView(String id)
id - | Method Detail |
|---|
public int getTotalRowCount()
UNKOWN_COUNT in case the count can't be determined.
public int getCurrentPageItemCount()
public int getCurrentPage()
getCurrentPage in interface IPageableprotected void onBeforeRender()
onBeforeRender in class AbstractRepeaterpublic int getPageCount()
getPageCount in interface IPageablepublic void setCurrentPage(int page)
setCurrentPage in interface IPageablepage - The page that should be rendered.public void clearCache()
protected IDataSource.IQuery wrapQuery(IDataSource.IQuery original)
original -
protected void onDetach()
onDetach in class Componentprotected abstract IGridSortState getSortState()
protected abstract IDataSource<T> getDataSource()
protected abstract int getRowsPerPage()
protected Iterator<IModel<T>> getItemModels()
getItemModels in class RefreshingView<T>RefreshingView.getItemModels()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||