T - type of validatablepublic class CompoundValidator<T> extends Behavior implements IValidator<T>
IValidator. Once an error is reported against the IValidatable being
checked, the rest of the validator chain is ignored.| Constructor and Description |
|---|
CompoundValidator()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CompoundValidator<T> |
add(IValidator<T> validator)
Adds an
IValidator to the chain of validators. |
void |
afterRender(Component component)
Called when a component that has this behavior coupled was rendered.
|
void |
beforeRender(Component component)
Called when a component is about to render.
|
void |
bind(Component component)
Bind this handler to the given component.
|
void |
detach(Component component)
Allows the behavior to detach any state it has attached during request processing.
|
boolean |
getStatelessHint(Component component)
This method returns false if the behavior generates a callback url (for example ajax
behaviors)
|
List<IValidator<T>> |
getValidators()
Gets an unmodifiable list of the registered validators.
|
void |
onComponentTag(Component component,
ComponentTag tag)
Called any time a component that has this behavior registered is rendering the component tag.
|
void |
onConfigure(Component component)
Called immediately after the onConfigure method in a component.
|
void |
onEvent(Component component,
IEvent<?> event)
Called to notify the behavior about any events sent to the component
|
void |
onException(Component component,
RuntimeException exception)
In case an unexpected exception happened anywhere between
Behavior.onComponentTag(org.apache.wicket.Component, org.apache.wicket.markup.ComponentTag) and
Behavior.afterRender(org.apache.wicket.Component),
onException() will be called for any behavior.
|
void |
onRemove(Component component)
Called to notify that the component is being removed from its parent
|
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section.
|
void |
unbind(Component component)
Notifies the behavior it is removed from the specified component
|
void |
validate(IValidatable<T> validatable)
Validates the
IValidatable instance. |
canCallListenerInterface, isEnabled, isTemporarypublic final CompoundValidator<T> add(IValidator<T> validator)
IValidator to the chain of validators.validator - an IValidator to be addedValidationError for chaining purposespublic final void validate(IValidatable<T> validatable)
IValidatorIValidatable instance. Validation errors should be reported using
the IValidatable.error(IValidationError) method.validate in interface IValidator<T>validatable - the IValidatable instance being validatedIValidator.validate(IValidatable)public final List<IValidator<T>> getValidators()
IValidators inside this onepublic void beforeRender(Component component)
BehaviorbeforeRender in class Behaviorcomponent - the component that has this behavior coupledpublic void afterRender(Component component)
BehaviorafterRender in class Behaviorcomponent - the component that has this behavior coupledpublic void bind(Component component)
Behaviorpublic void unbind(Component component)
Behaviorpublic void detach(Component component)
Behaviorpublic void onException(Component component, RuntimeException exception)
BehaviorBehavior.afterRender(Component), you should do the same in the implementation of this method.onException in class Behaviorcomponent - the component that has a reference to this behavior and during which processing
the exception occurredexception - the unexpected exceptionpublic boolean getStatelessHint(Component component)
BehaviorgetStatelessHint in class Behaviorcomponent - the component that has this behavior coupled.public void onComponentTag(Component component, ComponentTag tag)
BehavioronComponentTag in class Behaviorcomponent - the component that renders this tag currentlytag - the tag that is renderedpublic void renderHead(Component component, IHeaderResponse response)
BehaviorrenderHead in interface IComponentAwareHeaderContributorrenderHead in class Behaviorcomponent - component which is contributing to the response. This parameter is here to give
the component as the context for component-awares implementing this interfaceresponse - Response objectpublic void onConfigure(Component component)
BehavioronConfigure in class Behaviorcomponent - the component being configuredpublic void onEvent(Component component, IEvent<?> event)
BehavioronEvent in interface IComponentAwareEventSinkonEvent in class Behaviorcomponent - component that owns this sink. For example, if the implementation of this
interface is a Behavior then component parameter will contain the
component to which the behavior is attached.IComponentAwareEventSink.onEvent(org.apache.wicket.Component,
org.apache.wicket.event.IEvent)Copyright © 2006–2021 Apache Software Foundation. All rights reserved.