public abstract class AjaxFormSubmitBehavior extends AjaxEventBehavior
The form must have an id attribute in the markup or have MarkupIdSetter added.
AjaxEventBehavior,
onSubmit(org.apache.wicket.ajax.AjaxRequestTarget),
onAfterSubmit(org.apache.wicket.ajax.AjaxRequestTarget),
onError(org.apache.wicket.ajax.AjaxRequestTarget),
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
AjaxFormSubmitBehavior.AjaxFormSubmitter
A publicly reachable class that allows to introspect the submitter, e.g.
|
INDICATOR| Constructor and Description |
|---|
AjaxFormSubmitBehavior(Form<?> form,
String event)
Construct.
|
AjaxFormSubmitBehavior(String event)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Form<?> |
findForm()
Finds form that will be submitted
|
boolean |
getDefaultProcessing() |
Form<?> |
getForm() |
protected void |
onAfterSubmit(AjaxRequestTarget target)
Override this method to provide special submit handling in a multi-button form.
|
protected void |
onError(AjaxRequestTarget target)
Listener method invoked when the form has been processed and errors occurred
|
protected void |
onEvent(AjaxRequestTarget target)
Listener method for the ajax event
|
protected void |
onSubmit(AjaxRequestTarget target)
Override this method to provide special submit handling in a multi-button form.
|
static AjaxFormSubmitBehavior |
onSubmit(String eventName,
org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> onSubmit)
Creates an
AjaxFormSubmitBehavior based on lambda expressions |
void |
setDefaultProcessing(boolean defaultProcessing) |
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.
|
getEvent, onEvent, renderHead, respondfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindbeforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTagclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrendersPagepublic AjaxFormSubmitBehavior(String event)
event - javascript event this behavior is attached to, like onclickpublic final Form<?> getForm()
protected Form<?> findForm()
null if none foundprotected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehaviorupdateAjaxAttributes in class AjaxEventBehaviorprotected void onEvent(AjaxRequestTarget target)
AjaxEventBehavioronEvent in class AjaxEventBehaviortarget - the current request handlerprotected void onAfterSubmit(AjaxRequestTarget target)
target - the AjaxRequestTargetprotected void onSubmit(AjaxRequestTarget target)
target - the AjaxRequestTargetprotected void onError(AjaxRequestTarget target)
target - public boolean getDefaultProcessing()
true for default processingButton.getDefaultFormProcessing()public void setDefaultProcessing(boolean defaultProcessing)
defaultProcessing - Button.setDefaultFormProcessing(boolean)public static AjaxFormSubmitBehavior onSubmit(String eventName, org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> onSubmit)
AjaxFormSubmitBehavior based on lambda expressionseventName - the event nameonSubmit - the SerializableConsumer which accepts the AjaxRequestTargetAjaxFormSubmitBehaviorCopyright © 2006–2018 Apache Software Foundation. All rights reserved.