T - row/item model object typepublic abstract class AbstractPageableView<T>
extends org.apache.wicket.markup.repeater.RefreshingView<T>
implements org.apache.wicket.markup.html.navigation.paging.IPageable
AbstractPageableView alternative that uses
IDataSource as data source. Compared to Wicket
AbstractPageableView this component allows paging
without knowing the total number of rows.| Modifier and Type | Field and Description |
|---|---|
static long |
UNKNOWN_COUNT
Constant for unknown count of rows.
|
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
AbstractPageableView(String id)
Constructor.
|
AbstractPageableView(String id,
org.apache.wicket.model.IModel<T> model)
Constructor,
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
clears the queryResult so the next use will be forced to re-initialize
|
long |
getCurrentPage() |
int |
getCurrentPageItemCount()
Returns the count of items on current page.
|
protected abstract IDataSource<T> |
getDataSource() |
protected Iterator<org.apache.wicket.model.IModel<T>> |
getItemModels() |
long |
getPageCount()
Gets the total number of pages this pageable object has.
|
protected abstract long |
getRowsPerPage() |
protected abstract IGridSortState |
getSortState() |
long |
getTotalRowCount()
Returns the total count of items (sum of count of items on all pages) or
UNKNOWN_COUNT in case the count can't be determined. |
protected void |
onBeforeRender() |
protected void |
onDetach()
Cleanup
|
void |
setCurrentPage(long page)
Sets the a page that should be rendered.
|
void |
setMaxFirstItemReached(long maxFirstItemReached)
You should never need this method unless your pagingNavigator uses pageParametres
and dataSource is with unknown item count
|
protected IDataSource.IQuery |
wrapQuery(IDataSource.IQuery original)
Allows to wrap created query.
|
addItems, getItemReuseStrategy, getItems, newItem, newItemFactory, onPopulate, populateItem, setItemReuseStrategynewChildId, renderIteratordequeue, getMarkup, onRender, renderChildgetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onInitialize, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic static final long UNKNOWN_COUNT
public AbstractPageableView(String id, org.apache.wicket.model.IModel<T> model)
id - model - public AbstractPageableView(String id)
id - public long getTotalRowCount()
UNKNOWN_COUNT in case the count can't be determined.public int getCurrentPageItemCount()
public long getCurrentPage()
getCurrentPage in interface org.apache.wicket.markup.html.navigation.paging.IPageableprotected void onBeforeRender()
onBeforeRender in class org.apache.wicket.markup.repeater.AbstractRepeaterpublic long getPageCount()
getPageCount in interface org.apache.wicket.markup.html.navigation.paging.IPageablepublic void setCurrentPage(long page)
setCurrentPage in interface org.apache.wicket.markup.html.navigation.paging.IPageablepage - The page that should be rendered.public void setMaxFirstItemReached(long maxFirstItemReached)
maxFirstItemReached - public void clearCache()
protected IDataSource.IQuery wrapQuery(IDataSource.IQuery original)
original - protected void onDetach()
onDetach in class org.apache.wicket.MarkupContainerprotected abstract IGridSortState getSortState()
protected abstract IDataSource<T> getDataSource()
protected abstract long getRowsPerPage()
Copyright © 2015. All rights reserved.