S - the type of the sorting parameterpublic class OrderByLink<S> extends Link<Void>
| Modifier and Type | Field and Description |
|---|---|
static String |
SORT_ASCENDING_CSS_CLASS_KEY |
static String |
SORT_DESCENDING_CSS_CLASS_KEY |
static String |
SORT_NONE_CSS_CLASS_KEY |
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_DEQUEINGINTERFACE| Constructor and Description |
|---|
OrderByLink(String id,
S property,
ISortStateLocator<S> stateLocator)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected SortOrder |
nextSortOrder(SortOrder order)
returns the next sort order when changing it
|
void |
onClick() |
void |
onComponentTag(ComponentTag tag) |
protected void |
onSortChanged()
This method is a hook for subclasses to perform an action after sort has changed
|
OrderByLink<S> |
sort()
Re-sort data provider according to this link
|
appendAnchor, getAnchor, getAutoEnable, getModel, getModelObject, getOnClickScript, getPopupSettings, getStatelessHint, getURL, isEnabled, linksTo, onLinkClicked, setAnchor, setAutoEnable, setModel, setModelObject, setPopupSettingsdisableLink, getBody, onComponentTagBody, onDetach, setBodygetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onInitialize, onRender, 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, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, 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 String SORT_ASCENDING_CSS_CLASS_KEY
public static final String SORT_DESCENDING_CSS_CLASS_KEY
public static final String SORT_NONE_CSS_CLASS_KEY
public OrderByLink(String id, S property, ISortStateLocator<S> stateLocator)
id - the component id of the linkproperty - the name of the sortable property this link represents. this value will be used as
parameter for sort state object methods. sort state object will be located via the
stateLocator argument.stateLocator - locator used to locate sort state object that this will use to read/write state of
sorted propertiesprotected void onSortChanged()
public final OrderByLink<S> sort()
protected SortOrder nextSortOrder(SortOrder order)
order - previous sort orderpublic void onComponentTag(ComponentTag tag)
onComponentTag in class Link<Void>Copyright © 2006–2015 Apache Software Foundation. All rights reserved.