public abstract class AjaxFormComponentUpdatingBehavior extends AjaxEventBehavior
NOTE: This behavior does not validate any IFormValidators attached to this form even
though they may reference the component being updated.
NOTE: This behavior does not work on Choices or Groups use the
AjaxFormChoiceComponentUpdatingBehavior for that.
onUpdate(org.apache.wicket.ajax.AjaxRequestTarget),
onError(org.apache.wicket.ajax.AjaxRequestTarget, RuntimeException),
Serialized FormINDICATORINTERFACE| Constructor and Description |
|---|
AjaxFormComponentUpdatingBehavior(String event)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkComponent(FormComponent<?> component)
Check the component this behavior is bound to.
|
protected boolean |
disableFocusOnBlur()
Determines whether the focus will not be restored when the event is blur.
|
protected FormComponent<?> |
getFormComponent() |
protected boolean |
getUpdateModel()
Gives the control to the application to decide whether the form component model should
be updated automatically or not.
|
protected void |
onBind()
Subclasses should call super.onBind()
|
protected void |
onError(AjaxRequestTarget target,
RuntimeException e)
Called to handle any error resulting from updating form component.
|
protected void |
onEvent(AjaxRequestTarget target)
Listener method for the ajax event
|
protected abstract void |
onUpdate(AjaxRequestTarget target)
Listener invoked on the ajax request.
|
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.
|
getEvent, onCheckEvent, renderHead, respondfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindbeforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemovepublic AjaxFormComponentUpdatingBehavior(String event)
event - event to trigger this behaviorprotected void onBind()
AbstractDefaultAjaxBehavioronBind in class AbstractDefaultAjaxBehaviorAbstractAjaxBehavior.onBind()protected void checkComponent(FormComponent<?> component)
Logs a warning in development mode when an AjaxFormChoiceComponentUpdatingBehavior
should be used.
component - bound componentprotected final FormComponent<?> getFormComponent()
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehaviorupdateAjaxAttributes in class AjaxEventBehaviorprotected final void onEvent(AjaxRequestTarget target)
AjaxEventBehavioronEvent in class AjaxEventBehaviortarget - the current request handlerAjaxEventBehavior.onEvent(org.apache.wicket.ajax.AjaxRequestTarget)protected boolean getUpdateModel()
FormComponent.valid()
additionally in case the application want to update the model manually.protected boolean disableFocusOnBlur()
true if refocusing should be disabled, false otherwiseprotected abstract void onUpdate(AjaxRequestTarget target)
target - the current request handlerprotected void onError(AjaxRequestTarget target, RuntimeException e)
onUpdate(org.apache.wicket.ajax.AjaxRequestTarget) will not be caught here.
The RuntimeException will be null if it was just a validation or conversion error of the
FormComponenttarget - the current request handlere - the error that occurred during the update of the componentCopyright © 2006–2021 Apache Software Foundation. All rights reserved.