org.apache.wicket.ajax.form
Class AjaxFormChoiceComponentUpdatingBehavior
java.lang.Object
org.apache.wicket.behavior.AbstractBehavior
org.apache.wicket.behavior.AbstractHeaderContributor
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior
- All Implemented Interfaces:
- java.io.Serializable, IBehavior, IBehaviorListener, IClusterable, IRequestListener, IHeaderContributor
public abstract class AjaxFormChoiceComponentUpdatingBehavior
- extends AbstractDefaultAjaxBehavior
This is a Ajax Component Update Behavior that is meant for choices/groups that are not one
component in the html but many.
Use the normal AjaxFormChoiceComponentUpdatingBehavior
for the normal single component
fields
In order to be supported by this behavior the group components must output children with markup
id in format of 'groupId-childId'
- Author:
- jcompagner
- See Also:
RadioChoice
,
CheckBoxMultipleChoice
,
RadioGroup
,
CheckGroup
,
Serialized Form
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, throttleScript |
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
bind, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AjaxFormChoiceComponentUpdatingBehavior
public AjaxFormChoiceComponentUpdatingBehavior()
- Default constructor
renderHead
public void renderHead(IHeaderResponse response)
- Description copied from interface:
IHeaderContributor
- Render to the web response whatever the component wants to contribute to the head section.
TODO: Post 1.3, add component parameter, so that the behaviors dont' have to track component
instances
- Specified by:
renderHead
in interface IHeaderContributor
- Overrides:
renderHead
in class AbstractDefaultAjaxBehavior
- Parameters:
response
- Response object- See Also:
AbstractDefaultAjaxBehavior.renderHead(org.apache.wicket.markup.html.IHeaderResponse)
onUpdate
protected abstract void onUpdate(AjaxRequestTarget target)
- Listener invoked on the ajax request. This listener is invoked after the component's model
has been updated.
- Parameters:
target
-
onError
protected void onError(AjaxRequestTarget target,
java.lang.RuntimeException e)
- Called to handle any error resulting from updating form component. Errors thrown from
onUpdate(AjaxRequestTarget)
will not be caught here.
The RuntimeException will be null if it was just a validation or conversion error of the
FormComponent
- Parameters:
target
- e
-
onBind
protected void onBind()
- Description copied from class:
AbstractDefaultAjaxBehavior
- Subclasses should call super.onBind()
- Overrides:
onBind
in class AbstractDefaultAjaxBehavior
- See Also:
AbstractAjaxBehavior.onBind()
getFormComponent
protected final FormComponent<?> getFormComponent()
- Returns:
- FormComponent
getEventHandler
protected final java.lang.CharSequence getEventHandler()
- Returns:
- event handler
respond
protected final void respond(AjaxRequestTarget target)
- Specified by:
respond
in class AbstractDefaultAjaxBehavior
- Parameters:
target
- The AJAX target- See Also:
AbstractDefaultAjaxBehavior.respond(org.apache.wicket.ajax.AjaxRequestTarget)
Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.