|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.behavior.AbstractBehavior 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 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(java.lang.String event)
Construct. |
Method Summary | |
---|---|
protected boolean |
disableFocusOnBlur()
Determines whether the focus will not be restored when the event is blur. |
protected java.lang.CharSequence |
getEventHandler()
|
protected FormComponent |
getFormComponent()
|
protected boolean |
getUpdateModel()
|
protected void |
onBind()
Subclasses should call super.onBind() |
protected void |
onCheckEvent(java.lang.String event)
|
protected void |
onError(AjaxRequestTarget target,
java.lang.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 |
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
findIndicatorId, getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, renderHead, throttleScript |
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
---|
bind, getCallbackUrl, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution |
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior |
---|
afterRender, beforeRender, cleanup, detach, detachModel, exception, isEnabled, isTemporary, onException, rendered |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxFormComponentUpdatingBehavior(java.lang.String event)
event
- event to trigger this behaviorMethod Detail |
---|
protected void onBind()
AbstractDefaultAjaxBehavior
onBind
in class AbstractDefaultAjaxBehavior
AbstractAjaxBehavior.onBind()
protected final FormComponent getFormComponent()
protected final java.lang.CharSequence getEventHandler()
getEventHandler
in class AjaxEventBehavior
AjaxEventBehavior.getEventHandler()
protected void onCheckEvent(java.lang.String event)
onCheckEvent
in class AjaxEventBehavior
AjaxEventBehavior.onCheckEvent(java.lang.String)
protected final void onEvent(AjaxRequestTarget target)
AjaxEventBehavior
onEvent
in class AjaxEventBehavior
AjaxEventBehavior.onEvent(org.apache.wicket.ajax.AjaxRequestTarget)
protected boolean getUpdateModel()
protected boolean disableFocusOnBlur()
protected abstract void onUpdate(AjaxRequestTarget target)
target
- protected void onError(AjaxRequestTarget target, java.lang.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 |