public abstract class BookmarkableAjaxButton extends org.apache.wicket.ajax.markup.html.form.AjaxButton implements IBookmarkableComponent
AjaxButton
with the ability to set and remove URL fragment parameters.
You can set or remove parameters using #setFragmentParameter(String, String)
or
removeFragmentParameter(String)
during your handling of the submit and error event.
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR
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 |
---|
BookmarkableAjaxButton(String id) |
BookmarkableAjaxButton(String id,
org.apache.wicket.markup.html.form.Form<?> form) |
BookmarkableAjaxButton(String id,
org.apache.wicket.model.IModel<String> model) |
BookmarkableAjaxButton(String id,
org.apache.wicket.model.IModel<String> model,
org.apache.wicket.markup.html.form.Form<?> form) |
Modifier and Type | Method and Description |
---|---|
void |
addFragmentParameter(String parameterName,
Object parameterValue,
String delimiter)
Deprecated.
|
protected abstract void |
onBookmarkableError(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.markup.html.form.Form<?> form)
Override to handle the error event.
|
protected abstract void |
onBookmarkableSubmit(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.markup.html.form.Form<?> form)
Override to handle the submit event.
|
protected void |
onError(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.markup.html.form.Form<?> form) |
protected void |
onSubmit(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.markup.html.form.Form<?> form) |
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 . |
getForm, newAjaxFormSubmitBehavior, onAfterSubmit, onAfterSubmit, onComponentTag, onError, onInitialize, onSubmit, updateAjaxAttributes
getDefaultFormProcessing, getOnClickScript, initModel, setDefaultFormProcessing, updateModel
add, add, checkRequired, clearInput, convertInput, convertValue, error, getConvertedInput, getDefaultLabel, getDefaultLabel, getInput, getInputAsArray, getInputName, getModel, getModelObject, 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, setModel, setModelObject, setModelValue, setRequired, setType, shouldTrimInput, trim, updateAutoLabels, updateCollectionModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrder
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, onComponentTagBody, 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, 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
public BookmarkableAjaxButton(String id)
public BookmarkableAjaxButton(String id, org.apache.wicket.model.IModel<String> model)
public BookmarkableAjaxButton(String id, org.apache.wicket.markup.html.form.Form<?> form)
protected void onSubmit(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)
onSubmit
in class org.apache.wicket.ajax.markup.html.form.AjaxButton
protected void onError(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)
onError
in class org.apache.wicket.ajax.markup.html.form.AjaxButton
protected abstract void onBookmarkableSubmit(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)
urlFragment()
inside this method.target
- form
- protected abstract void onBookmarkableError(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)
urlFragment()
inside this method.target
- form
- @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.