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.
INDICATOR
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, onEvent, renderHead, respond
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rendersPage
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehavior
updateAjaxAttributes
in class AjaxEventBehavior
protected final void onEvent(AjaxRequestTarget target)
AjaxEventBehavior
onEvent
in class AjaxEventBehavior
target
- the current request handlerCopyright © 2006–2022 Apache Software Foundation. All rights reserved.