org.apache.wicket.ajax.form
Class AjaxFormValidatingBehavior

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.AjaxEventBehavior
                  extended by org.apache.wicket.ajax.form.AjaxFormSubmitBehavior
                      extended by org.apache.wicket.ajax.form.AjaxFormValidatingBehavior
All Implemented Interfaces:
Serializable, IBehavior, IBehaviorListener, IComponentConfigurationBehavior, IClusterable, IRequestListener, IHeaderContributor

public class AjaxFormValidatingBehavior
extends AjaxFormSubmitBehavior

Ajax event behavior that submits the form and updates all form feedback panels on the page. Useful for providing instant feedback.

Since:
1.2
Author:
Igor Vaynberg (ivaynberg)
See Also:
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
AjaxFormValidatingBehavior(Form<?> form, String event)
          Construct.
 
Method Summary
static void addToAllFormComponents(Form<?> form, String event)
          Adds this behavior to all form components of the specified form
static void addToAllFormComponents(Form<?> form, String event, Duration throttleDelay)
          Adds this behavior to all form components of the specified form
protected  void onError(AjaxRequestTarget target)
          Listener method invoked when the form has been processed and errors occurred
protected  void onSubmit(AjaxRequestTarget target)
          Listener method that is invoked after the form has been submitted and processed without errors
 
Methods inherited from class org.apache.wicket.ajax.form.AjaxFormSubmitBehavior
findForm, getEventHandler, getForm, getPreconditionScript, onEvent
 
Methods inherited from class org.apache.wicket.ajax.AjaxEventBehavior
generateCallbackScript, getEvent, onCheckEvent, onComponentTag, respond, setThrottleDelay
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getSuccessScript, onBind, 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, onConfigure, onException, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxFormValidatingBehavior

public AjaxFormValidatingBehavior(Form<?> form,
                                  String event)
Construct.

Parameters:
form - form that will be submitted via ajax
event - javascript event this behavior will be invoked on, like onclick
Method Detail

onSubmit

protected void onSubmit(AjaxRequestTarget target)
Description copied from class: AjaxFormSubmitBehavior
Listener method that is invoked after the form has been submitted and processed without errors

Specified by:
onSubmit in class AjaxFormSubmitBehavior
See Also:
AjaxFormSubmitBehavior.onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)

onError

protected void onError(AjaxRequestTarget target)
Description copied from class: AjaxFormSubmitBehavior
Listener method invoked when the form has been processed and errors occurred

Specified by:
onError in class AjaxFormSubmitBehavior
See Also:
AjaxFormSubmitBehavior.onError(org.apache.wicket.ajax.AjaxRequestTarget)

addToAllFormComponents

public static void addToAllFormComponents(Form<?> form,
                                          String event)
Adds this behavior to all form components of the specified form

Parameters:
form -
event -

addToAllFormComponents

public static void addToAllFormComponents(Form<?> form,
                                          String event,
                                          Duration throttleDelay)
Adds this behavior to all form components of the specified form

Parameters:
form -
event -
throttleDelay -


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.