org.apache.wicket.ajax.form
Class AjaxFormChoiceComponentUpdatingBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.apache.wicket.behavior.AbstractAjaxBehavior
          extended by org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
              extended by 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

Author:
jcompagner
See Also:
RadioChoice, CheckBoxMultipleChoice, RadioGroup, CheckGroup, Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Constructor Summary
AjaxFormChoiceComponentUpdatingBehavior()
          Default constructor
 
Method Summary
protected  java.lang.CharSequence getEventHandler()
           
protected  FormComponent getFormComponent()
           
protected  void onBind()
          Subclasses should call super.onBind()
protected  void onError(AjaxRequestTarget target, java.lang.RuntimeException e)
          Called to handle any error resulting from updating form component.
protected abstract  void onUpdate(AjaxRequestTarget target)
          Listener invoked on the ajax request.
 void renderHead(IHeaderResponse response)
          Render to the web response whatever the component wants to contribute to the head section.
protected  void respond(AjaxRequestTarget target)
           
 
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, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, 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

AjaxFormChoiceComponentUpdatingBehavior

public AjaxFormChoiceComponentUpdatingBehavior()
Default constructor

Method Detail

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.