Package org.apache.wicket.ajax
Class AjaxPreventSubmitBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.behavior.AbstractAjaxBehavior
-
- org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
- org.apache.wicket.ajax.AjaxEventBehavior
-
- org.apache.wicket.ajax.AjaxPreventSubmitBehavior
-
- All Implemented Interfaces:
java.io.Serializable,IComponentAwareEventSink,IRequestListener,IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable
public class AjaxPreventSubmitBehavior extends AjaxEventBehavior
An Ajax behavior that could be used to prevent the form submit when the user presses the ENTER key while in an HTML <input type="text" > field.
The behavior could be applied to a
TextFieldor to a parent container that will apply this behavior to all children of type HTMLInputElement.This Ajax behavior is client-side only, i.e. it never fires an Ajax call to the server.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
-
-
Constructor Summary
Constructors Constructor Description AjaxPreventSubmitBehavior()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidonEvent(AjaxRequestTarget target)Listener method for the ajax eventprotected voidupdateAjaxAttributes(AjaxRequestAttributes attributes)Gives a chance to the specializations to modify the attributes.-
Methods inherited from class org.apache.wicket.ajax.AjaxEventBehavior
getEvent, onEvent, renderHead, respond
-
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
-
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
-
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
-
-
-
Method Detail
-
updateAjaxAttributes
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
Description copied from class:AbstractDefaultAjaxBehaviorGives a chance to the specializations to modify the attributes.- Overrides:
updateAjaxAttributesin classAjaxEventBehavior
-
onEvent
protected final void onEvent(AjaxRequestTarget target)
Description copied from class:AjaxEventBehaviorListener method for the ajax event- Specified by:
onEventin classAjaxEventBehavior- Parameters:
target- the current request handler
-
-