public abstract class ButtonLink<T> extends AbstractButtonLink<T> implements org.apache.wicket.markup.html.link.ILinkListener
| Constructor and Description |
|---|
ButtonLink(String id) |
ButtonLink(String id,
org.apache.wicket.model.IModel<T> model) |
ButtonLink(String id,
org.apache.wicket.model.IModel<T> model,
org.apache.wicket.model.IModel<String> labelModel) |
ButtonLink(String id,
String label) |
| Modifier and Type | Method and Description |
|---|---|
protected CharSequence |
appendAnchor(org.apache.wicket.markup.ComponentTag tag,
CharSequence url)
Appends any anchor to the url if the url is not null and the url does not already contain an
anchor (url.indexOf('#') != -1).
|
org.apache.wicket.Component |
getAnchor()
Gets any anchor component.
|
boolean |
getAutoEnable()
Gets whether link should automatically enable/disable based on current page.
|
protected CharSequence |
getOnClickScript(CharSequence url) |
org.apache.wicket.markup.html.link.PopupSettings |
getPopupSettings()
Gets the popup specification.
|
protected boolean |
getStatelessHint() |
protected CharSequence |
getURL()
Gets the url to use for this link.
|
boolean |
isEnabled() |
protected boolean |
linksTo(org.apache.wicket.Page page)
Whether this link refers to the given page.
|
abstract void |
onClick()
Called when a link is clicked.
|
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Handles this link's tag.
|
void |
onLinkClicked()
THIS METHOD IS NOT PART OF THE WICKET API.
|
ButtonLink<T> |
setAnchor(org.apache.wicket.Component anchor)
Sets an anchor component.
|
ButtonLink<T> |
setAutoEnable(boolean autoEnable)
Sets whether this link should automatically enable/disable based on current page.
|
ButtonLink<T> |
setPopupSettings(org.apache.wicket.markup.html.link.PopupSettings popupSettings)
Sets the popup specification.
|
disableLink, getButtonSizeModel, getButtonStyleModel, isLinkEnabled, onComponentTagBody, onInitialize, setButtonSize, setButtonStyle, setLabelModelgetModel, getModelObject, setModel, setModelObjectgetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, 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, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onDetach, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, 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 ButtonLink(String id)
public org.apache.wicket.Component getAnchor()
public final boolean getAutoEnable()
public final org.apache.wicket.markup.html.link.PopupSettings getPopupSettings()
public boolean isEnabled()
isEnabled in class org.apache.wicket.ComponentComponent.isEnabled()protected boolean getStatelessHint()
getStatelessHint in class org.apache.wicket.ComponentComponent.getStatelessHint()public abstract void onClick()
public final void onLinkClicked()
onLinkClicked in interface org.apache.wicket.markup.html.link.ILinkListenerILinkListenerpublic ButtonLink<T> setAnchor(org.apache.wicket.Component anchor)
Component.getOutputMarkupId() flag true, or it must be attached to a <a tag with a
href attribute of more than one character starting with '#' ('<a href="#someAnchor" ...
').anchor - The anchorpublic final ButtonLink<T> setAutoEnable(boolean autoEnable)
autoEnable - whether this link should automatically enable/disable based on current page.public final ButtonLink<T> setPopupSettings(org.apache.wicket.markup.html.link.PopupSettings popupSettings)
popupSettings - the popup specification.protected CharSequence appendAnchor(org.apache.wicket.markup.ComponentTag tag, CharSequence url)
Component.getMarkupId() if Component.getOutputMarkupId()
returns true, or if the anchor component does not output it's id, this method will try to
retrieve the id from the markup directly. If neither is found, an
exception is thrown. If no anchor component was set, but the
link component is attached to a <a element, this method will append what is in the href
attribute if there is one, starts with a '#' and has more than one character.
You can override this method, but it means that you have to take care of whatever is done with any set anchor component yourself. You also have to manually append the '#' at the right place.
tag - The component tagurl - The url to start withprotected CharSequence getOnClickScript(CharSequence url)
url - The url for the linkprotected CharSequence getURL()
protected boolean linksTo(org.apache.wicket.Page page)
page - A pageprotected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag in class AbstractButtonLink<T>tag - the component tagComponent.onComponentTag(ComponentTag)Copyright © 2014 dontdrinkandroot. All rights reserved.