Package org.apache.wicket.ajax.form
Class AjaxFormChoiceComponentUpdatingBehavior
- 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.form.AjaxFormComponentUpdatingBehavior
-
- org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior
-
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IRequestListener
,IComponentAwareHeaderContributor
,org.apache.wicket.util.io.IClusterable
public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AjaxFormComponentUpdatingBehavior
This is an Ajax behavior that is meant to update a group of choices that are represented by multiple components.Use the normal
AjaxFormComponentUpdatingBehavior
for the normal single component fields.Notification is triggered by a
change
JavaScript event - if neededAjaxEventBehavior.getEvent()
can be overridden to deviate from this default.- Author:
- jcompagner, svenmeier
- See Also:
AjaxFormComponentUpdatingBehavior.onUpdate(org.apache.wicket.ajax.AjaxRequestTarget)
,AjaxFormComponentUpdatingBehavior.onError(org.apache.wicket.ajax.AjaxRequestTarget, RuntimeException)
,RadioChoice
,CheckBoxMultipleChoice
,RadioGroup
,CheckGroup
, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
-
-
Constructor Summary
Constructors Constructor Description AjaxFormChoiceComponentUpdatingBehavior()
Construct.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkComponent(FormComponent<?> component)
Check the component this behavior is bound to.protected void
onBind()
Subclasses should call super.onBind()static AjaxFormChoiceComponentUpdatingBehavior
onUpdateChoice(org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> onUpdateChoice)
Creates anAjaxFormChoiceComponentUpdatingBehavior
based on lambda expressionsprotected void
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.-
Methods inherited from class org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior
disableFocusOnBlur, getFormComponent, getUpdateModel, onError, onEvent, onUpdate, onUpdate
-
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, onMethodMismatch, 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
-
-
-
-
Constructor Detail
-
AjaxFormChoiceComponentUpdatingBehavior
public AjaxFormChoiceComponentUpdatingBehavior()
Construct.
-
-
Method Detail
-
updateAjaxAttributes
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
Description copied from class:AbstractDefaultAjaxBehavior
Gives a chance to the specializations to modify the attributes.- Overrides:
updateAjaxAttributes
in classAjaxFormComponentUpdatingBehavior
-
onBind
protected void onBind()
Description copied from class:AbstractDefaultAjaxBehavior
Subclasses should call super.onBind()- Overrides:
onBind
in classAjaxFormComponentUpdatingBehavior
- See Also:
AbstractAjaxBehavior.onBind()
-
checkComponent
protected void checkComponent(FormComponent<?> component)
Description copied from class:AjaxFormComponentUpdatingBehavior
Check the component this behavior is bound to.Logs a warning in development mode when an
AjaxFormChoiceComponentUpdatingBehavior
should be used.- Overrides:
checkComponent
in classAjaxFormComponentUpdatingBehavior
- Parameters:
component
- bound component
-
onUpdateChoice
public static AjaxFormChoiceComponentUpdatingBehavior onUpdateChoice(org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> onUpdateChoice)
Creates anAjaxFormChoiceComponentUpdatingBehavior
based on lambda expressions- Parameters:
onUpdateChoice
- theSerializableConsumer
which accepts theAjaxRequestTarget
- Returns:
- the
AjaxFormChoiceComponentUpdatingBehavior
-
-