Module org.apache.wicket.core
Class FormValidatorAdapter
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.markup.html.form.validation.FormValidatorAdapter
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IFormValidator
,IComponentAwareHeaderContributor
,IClusterable
Adapts
IFormValidator
to Behavior
- Author:
- igor
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionFormComponent<?>[]
void
This method is ran if all components returned byIFormValidator.getDependentFormComponents()
are valid.Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, renderHead, unbind
-
Constructor Details
-
FormValidatorAdapter
Constructor- Parameters:
validator
-
-
-
Method Details
-
getDependentFormComponents
- Specified by:
getDependentFormComponents
in interfaceIFormValidator
- Returns:
- array of
FormComponent
s that this validator depends on
-
validate
This method is ran if all components returned byIFormValidator.getDependentFormComponents()
are valid.To report validation error use
FormComponent.error(org.apache.wicket.validation.IValidationError)
by using any of the dependent form components or extend from AbstractFormValidator and use itsAbstractFormValidator.error(FormComponent, String, java.util.Map)
method.- Specified by:
validate
in interfaceIFormValidator
- Parameters:
form
- form this validator is added to
-
getValidator
- Returns:
- form validator
-