|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.behavior.Behavior org.apache.wicket.behavior.AbstractAjaxBehavior org.apache.wicket.ajax.AbstractDefaultAjaxBehavior org.apache.wicket.ajax.AjaxEventBehavior org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior
public abstract class AjaxFormComponentUpdatingBehavior
A behavior that updates the hosting FormComponent via ajax when an event it is attached to is triggered. This behavior encapsulates the entire form-processing workflow as relevant only to this component so if validation is successful the component's model will be updated according to the submitted value.
NOTE: This behavior does not validate any IFormValidator
s 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.
Field Summary |
---|
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
INDICATOR |
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
AjaxFormComponentUpdatingBehavior(String event)
Construct. |
Method Summary | |
---|---|
protected boolean |
disableFocusOnBlur()
Determines whether the focus will not be restored when the event is blur. |
protected FormComponent<?> |
getFormComponent()
|
protected boolean |
getUpdateModel()
|
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. |
Methods inherited from class org.apache.wicket.ajax.AjaxEventBehavior |
---|
getEvent, onCheckEvent, renderHead, respond |
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes |
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
---|
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag |
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxFormComponentUpdatingBehavior(String event)
event
- event to trigger this behaviorMethod Detail |
---|
protected void onBind()
AbstractDefaultAjaxBehavior
onBind
in class AbstractDefaultAjaxBehavior
AbstractAjaxBehavior.onBind()
protected final FormComponent<?> getFormComponent()
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehavior
updateAjaxAttributes
in class AjaxEventBehavior
protected final void onEvent(AjaxRequestTarget target)
AjaxEventBehavior
onEvent
in class AjaxEventBehavior
target
- the current request handlerAjaxEventBehavior.onEvent(org.apache.wicket.ajax.AjaxRequestTarget)
protected boolean getUpdateModel()
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
FormComponent
target
- the current request handlere
- the error that occurred during the update of the component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |