public abstract class BootstrapPaginator extends org.apache.wicket.markup.html.form.FormComponentPanel<Integer>
Example:
<nav> <ul wicket:id="paginator" class="pagination"></ul> </nav>
The related Java code:
new BootstrapPaginator("paginator", Model.of(2000)) { public void onPageChange(AjaxRequestTarget target, IModel<Integer> page) { ... } }
Constructor and Description |
---|
BootstrapPaginator(String id,
org.apache.wicket.model.IModel<Integer> totalResults)
Creates a paginator with 20 results per page by default
|
BootstrapPaginator(String id,
org.apache.wicket.model.IModel<Integer> totalResults,
int resultsPerPage)
Creates a paginator
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentIndex()
Get the first first index for the current page
|
int |
getNumberResultsPerPage()
Get the number of results per page that the paginator uses to calculate how many pages should exist
|
int |
getPagesToShow()
Return the number of pages to show on the pagination component
|
int |
getTotalPages()
Get the total of pages shown
|
org.apache.wicket.model.IModel<Integer> |
getTotalResults()
Get the model with the total number of results
|
boolean |
isHiddenFirstButton()
Return if the goto first page button is hidden when it's not needed
|
boolean |
isHiddenLastButton()
Return if the goto last page button is hidden when it's not needed
|
boolean |
isHiddenNextButton()
Return if the goto next page button is hidden when it's not needed
|
boolean |
isHiddenPreviousButton()
Return if the goto previous page button is hidden when it's not needed
|
boolean |
isShowFirstButton()
Return if the goto first page button is shown
|
boolean |
isShowLastButton()
Return if the goto last page button is shown
|
boolean |
isShowNextButton()
Return if the goto next page button is shown
|
boolean |
isShowPreviousButton()
Return if the goto previous page button is shown
|
abstract void |
onPageChange(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.model.IModel<Integer> page)
This method is called every time the current page changes
|
void |
setHiddenFirstButton(boolean hiddenFirstButton)
Sets if the goto first page button should be hidden when it's not needed
|
void |
setHiddenLastButton(boolean hiddenLastButton)
Sets if the goto last page button should be hidden when it's not needed
|
void |
setHiddenNextButton(boolean hiddenNextButton)
Sets if the goto next page button should be hidden when it's not needed
|
void |
setHiddenPreviousButton(boolean hiddenPreviousButton)
Sets if the goto previous page button should be hidden when it's not needed
|
void |
setNumberResultsPerPage(int numberResultsPerPage)
Set the number of results per page that the paginator uses to calculate how many pages should exist
|
void |
setPagesToShow(int pagesToShow)
Sets the number of pages to show on the pagination component
|
void |
setShowFirstButton(boolean showFirstButton)
Sets whether to show the goto first page option
|
void |
setShowLastButton(boolean showLastButton)
Sets whether to show the goto last page option
|
void |
setShowNextButton(boolean showNextButton)
Sets whether to show the goto next page option
|
void |
setShowPreviousButton(boolean showPreviousButton)
Sets whether to show the goto previous page option
|
void |
setTotalResults(org.apache.wicket.model.IModel<Integer> totalResults)
Set the model with the total number of results
|
checkRequired, clearInput, newMarkupSourcingStrategy, onComponentTag
add, add, convertInput, convertValue, error, getConvertedInput, getDefaultLabel, getDefaultLabel, getForm, getInput, getInputAsArray, getInputName, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isInputNullable, isMultiPart, isRequired, isValid, newValidatable, newValidationError, onDetach, onDisabled, onInvalid, onRequired, onValid, processChildren, processInput, remove, reportRequiredError, setConvertedInput, setLabel, setModelValue, setRequired, setType, shouldTrimInput, trim, updateAutoLabels, updateCollectionModel, updateModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrder
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dequeue, getRegionMarkup, newDequeueContext
getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObject
forEach, spliterator
public BootstrapPaginator(String id, org.apache.wicket.model.IModel<Integer> totalResults)
id
- component idtotalResults
- model for total resultspublic boolean isShowFirstButton()
public void setShowFirstButton(boolean showFirstButton)
showFirstButton
- whether to show the goto first page optionpublic boolean isShowLastButton()
public void setShowLastButton(boolean showLastButton)
showLastButton
- if true show the goto last page optionpublic boolean isShowNextButton()
public void setShowNextButton(boolean showNextButton)
showNextButton
- whether to show the goto next page optionpublic boolean isShowPreviousButton()
public void setShowPreviousButton(boolean showPreviousButton)
showPreviousButton
- whether to show the goto previous page optionpublic int getPagesToShow()
public void setPagesToShow(int pagesToShow)
pagesToShow
- number of pages to show on the pagination componentpublic int getTotalPages()
public boolean isHiddenFirstButton()
public void setHiddenFirstButton(boolean hiddenFirstButton)
hiddenFirstButton
- if the goto first page button should be hidden when it's not neededpublic boolean isHiddenLastButton()
public void setHiddenLastButton(boolean hiddenLastButton)
hiddenLastButton
- if the goto last page button should be hidden when it's not neededpublic boolean isHiddenPreviousButton()
public void setHiddenPreviousButton(boolean hiddenPreviousButton)
hiddenPreviousButton
- if the goto previous page button should be hidden when it's not neededpublic boolean isHiddenNextButton()
public void setHiddenNextButton(boolean hiddenNextButton)
hiddenNextButton
- if the goto next page button should be hidden when it's not neededpublic abstract void onPageChange(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.model.IModel<Integer> page)
target
- ajax target (paginator was already added)page
- the new current pagepublic org.apache.wicket.model.IModel<Integer> getTotalResults()
public void setTotalResults(org.apache.wicket.model.IModel<Integer> totalResults)
totalResults
- model with the number of resultspublic int getNumberResultsPerPage()
public void setNumberResultsPerPage(int numberResultsPerPage)
numberResultsPerPage
- number of results per pagepublic int getCurrentIndex()
Copyright © 2014–2019 Premium Minds. All rights reserved.