net.databinder.components
Class AjaxOnKeyPausedSubmitter
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.AjaxFormSubmitBehavior
net.databinder.components.AjaxOnKeyPausedSubmitter
- All Implemented Interfaces:
- java.io.Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.behavior.IBehaviorListener, org.apache.wicket.IClusterable, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.IHeaderContributor
public abstract class AjaxOnKeyPausedSubmitter
- extends org.apache.wicket.ajax.form.AjaxFormSubmitBehavior
Attaches itself to the onchange event for a TextField or TextArea, and enhances that
event to fire not just when focus changes but also when keyboard input pauses. This
is effected in JavaScript, with a timer that resets when the onkeyup event fires.
- Author:
- Nathan Hamblen
- See Also:
- Serialized Form
| Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
INDICATOR |
| Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
INTERFACE |
|
Method Summary |
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Adds JavaScript listeners for onkeyup and onblur. |
protected void |
onError(org.apache.wicket.ajax.AjaxRequestTarget target)
Does nothing; override to respond to errors in the submitted form. |
void |
renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
Adds needed JavaScript to header. |
| Methods inherited from class org.apache.wicket.ajax.form.AjaxFormSubmitBehavior |
getEventHandler, getForm, getPreconditionScript, onEvent, onSubmit |
| Methods inherited from class org.apache.wicket.ajax.AjaxEventBehavior |
generateCallbackScript, getEvent, onCheckEvent, respond, setThrottleDelay |
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getSuccessScript, onBind, onRequest, 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 |
AjaxOnKeyPausedSubmitter
public AjaxOnKeyPausedSubmitter()
- Binds to onchange.
renderHead
public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
- Adds needed JavaScript to header.
- Specified by:
renderHead in interface org.apache.wicket.markup.html.IHeaderContributor- Overrides:
renderHead in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
onComponentTag
protected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
- Adds JavaScript listeners for onkeyup and onblur.
- Overrides:
onComponentTag in class org.apache.wicket.ajax.AjaxEventBehavior
onError
protected void onError(org.apache.wicket.ajax.AjaxRequestTarget target)
- Does nothing; override to respond to errors in the submitted form. (Submit on
pause is probably not a good match for forms that need validation.)
- Specified by:
onError in class org.apache.wicket.ajax.form.AjaxFormSubmitBehavior
Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.