|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 support persisting form component values into cookie or other
IValuePersister. If this is necessary please add a request for enhancement.
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.
| 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 CharSequence |
getEventHandler()
|
protected FormComponent<?> |
getFormComponent()
|
protected boolean |
getUpdateModel()
|
protected void |
onBind()
Subclasses should call super.onBind() |
protected void |
onCheckEvent(String event)
|
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. |
| Methods inherited from class org.apache.wicket.ajax.AjaxEventBehavior |
|---|
generateCallbackScript, getEvent, onComponentTag, respond, setThrottleDelay, toString |
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
|---|
findIndicatorId, getAjaxCallDecorator, getCallbackScript, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, renderHead, throttleScript |
| Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
|---|
afterRender, bind, getCallbackUrl, getComponent, getStatelessHint, onComponentRendered, onComponentTag, onUnbind, unbind |
| Methods inherited from class org.apache.wicket.behavior.Behavior |
|---|
beforeRender, canCallListenerInterface, canCallListenerInterface, detach, isEnabled, isTemporary, onConfigure, onEvent, onException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AjaxFormComponentUpdatingBehavior(String event)
event - event to trigger this behavior| Method Detail |
|---|
protected void onBind()
AbstractDefaultAjaxBehavior
onBind in class AbstractDefaultAjaxBehaviorAbstractAjaxBehavior.onBind()protected final FormComponent<?> getFormComponent()
protected final CharSequence getEventHandler()
getEventHandler in class AjaxEventBehaviorAjaxEventBehavior.getEventHandler()protected void onCheckEvent(String event)
onCheckEvent in class AjaxEventBehaviorAjaxEventBehavior.onCheckEvent(java.lang.String)protected final void onEvent(AjaxRequestTarget target)
AjaxEventBehavior
onEvent in class AjaxEventBehaviorAjaxEventBehavior.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 -
protected void onError(AjaxRequestTarget target,
RuntimeException e)
onUpdate(AjaxRequestTarget) will not be caught here.
The RuntimeException will be null if it was just a validation or conversion error of the
FormComponent
target - e -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||