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 TextField or 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.
INDICATORINTERFACE| Constructor and Description |
|---|
AjaxPreventSubmitBehavior()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
onEvent(AjaxRequestTarget target)
Listener method for the ajax event
|
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.
|
getEvent, onCheckEvent, renderHead, respondfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindbeforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemoveprotected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehaviorupdateAjaxAttributes in class AjaxEventBehaviorprotected final void onEvent(AjaxRequestTarget target)
AjaxEventBehavioronEvent in class AjaxEventBehaviortarget - the current request handlerCopyright © 2006–2021 Apache Software Foundation. All rights reserved.