public class FormValidatorAdapter extends Behavior implements IFormValidator
IFormValidator
to Behavior
Constructor and Description |
---|
FormValidatorAdapter(IFormValidator validator)
Constructor
|
Modifier and Type | Method and Description |
---|---|
FormComponent<?>[] |
getDependentFormComponents() |
IFormValidator |
getValidator() |
void |
validate(Form<?> form)
This method is ran if all components returned by
IFormValidator.getDependentFormComponents() are valid. |
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, renderHead, unbind
public FormValidatorAdapter(IFormValidator validator)
validator
- public FormComponent<?>[] getDependentFormComponents()
getDependentFormComponents
in interface IFormValidator
FormComponent
s that this validator depends onpublic void validate(Form<?> form)
IFormValidator.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 its
AbstractFormValidator.error(FormComponent, String, java.util.Map)
method.
validate
in interface IFormValidator
form
- form this validator is added topublic IFormValidator getValidator()
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.