T
- public abstract class BookmarkableAjaxLink<T> extends org.apache.wicket.ajax.markup.html.AjaxLink<T> implements IBookmarkableComponent
AjaxLink
which will set an URL fragment parameter in the browser.
You can provide a default parameter to the constructors so it will be set automatically during
event handling. You can also set or remove parameters by yourself using
#setFragmentParameter(String, String)
or removeFragmentParameter(String)
.
Modifier and Type | Field and Description |
---|---|
protected String |
defaultarameterName |
protected String |
defaultParamterValue |
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 |
---|
BookmarkableAjaxLink(String id)
Constructor.
|
BookmarkableAjaxLink(String id,
org.apache.wicket.model.IModel<T> model)
Constructor.
|
BookmarkableAjaxLink(String id,
org.apache.wicket.model.IModel<T> model,
String parameterName,
String parameterValue)
Constructor.
|
BookmarkableAjaxLink(String id,
String parameterName,
String parameterValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFragmentParameter(String parameterName,
Object parameterValue,
String delimiter)
Deprecated.
|
abstract void |
onBookmarkableClick(org.apache.wicket.ajax.AjaxRequestTarget target)
Handles the click event.
|
void |
onClick(org.apache.wicket.ajax.AjaxRequestTarget target) |
void |
removeFragmentParameter(String parameterName)
Deprecated.
|
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
void |
setFragmentParameter(String parameterName,
Object parameterValue)
Deprecated.
|
protected UrlFragment |
urlFragment()
Returns a
UrlFragment connected to the current AjaxRequestTarget . |
getModel, getModelObject, newAjaxEventBehavior, onComponentTag, onInitialize, setModel, setModelObject, updateAjaxAttributes
disableLink, getBody, onComponentTagBody, onDetach, setBody
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, 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, onBeforeRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, 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, wrap
protected String defaultarameterName
protected String defaultParamterValue
public BookmarkableAjaxLink(String id)
id
- public BookmarkableAjaxLink(String id, org.apache.wicket.model.IModel<T> model)
id
- model
- public BookmarkableAjaxLink(String id, String parameterName, String parameterValue)
id
- parameterName
- parameterValue
- public BookmarkableAjaxLink(String id, org.apache.wicket.model.IModel<T> model, String parameterName, String parameterValue)
id
- model
- parameterName
- parameterValue
- public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
onClick
in interface org.apache.wicket.ajax.markup.html.IAjaxLink
onClick
in class org.apache.wicket.ajax.markup.html.AjaxLink<T>
public abstract void onBookmarkableClick(org.apache.wicket.ajax.AjaxRequestTarget target)
urlFragment()
inside this method.target
- @Deprecated public void setFragmentParameter(String parameterName, Object parameterValue)
IBookmarkableComponent
AjaxRequestTarget
.
The parameter will be overwritten if it already exists.
setFragmentParameter
in interface IBookmarkableComponent
parameterName
- the name of your URL fragment parameter to setparameterValue
- the value of your URL fragment parameter to set@Deprecated public void addFragmentParameter(String parameterName, Object parameterValue, String delimiter)
IBookmarkableComponent
Use the following instead:
urlFragment().addParameter(parameterName, parameterValue, delimiter);
AjaxRequestTarget
.
The parameter will be created if it doesn't exists yet.
The value will be appended with the specified delimiter if the parameter already exists.
addFragmentParameter
in interface IBookmarkableComponent
parameterName
- the name of your URL fragment parameter to setparameterValue
- the value of your URL fragment parameter to setdelimiter
- the delimiter the given value will be appended with if the given parameter already
exists@Deprecated public void removeFragmentParameter(String parameterName)
IBookmarkableComponent
Use the following instead: urlFragment().removeParameter(parameterName);
AjaxRequestTarget
.removeFragmentParameter
in interface IBookmarkableComponent
parameterName
- the name of your URL fragment parameter to setprotected UrlFragment urlFragment()
UrlFragment
connected to the current AjaxRequestTarget
. Use the
UrlFragment
to update the URL fragment in the browser after the current AJAX event.public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
renderHead
in class org.apache.wicket.Component
Copyright © 2015. All rights reserved.