public abstract class OnChangeAjaxBehavior extends AjaxFormComponentUpdatingBehavior
FormComponent
via Ajax when value of the component is
changed.
This behavior uses best available method to track changes on different types of form components. To accomplish this for text input form components it uses a custom event, named 'inputchange', that is handled in the best way for the specific browser. For other form component types the 'change' event is used.
AjaxFormComponentUpdatingBehavior.onUpdate(org.apache.wicket.ajax.AjaxRequestTarget)
,
AjaxFormComponentUpdatingBehavior.onError(org.apache.wicket.ajax.AjaxRequestTarget, RuntimeException)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
EVENT_CHANGE
the change event
|
static String |
EVENT_NAME
'inputchange' event delegates to 'input', 'keyup', 'cut' and 'paste' events
for text input form component depending on the browser.
|
INDICATOR
Constructor and Description |
---|
OnChangeAjaxBehavior()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static OnChangeAjaxBehavior |
onChange(org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> onChange)
Creates an
OnChangeAjaxBehavior based on lambda expressions |
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.
|
checkComponent, disableFocusOnBlur, getFormComponent, getUpdateModel, onBind, onError, onEvent, onUpdate, onUpdate
getEvent, onEvent, renderHead, respond
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, 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
public static final String EVENT_NAME
public static final String EVENT_CHANGE
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehavior
updateAjaxAttributes
in class AjaxFormComponentUpdatingBehavior
public static OnChangeAjaxBehavior onChange(org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> onChange)
OnChangeAjaxBehavior
based on lambda expressionsonChange
- the SerializableConsumer
which accepts the AjaxRequestTarget
OnChangeAjaxBehavior
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.