Package org.apache.wicket.validation
Class ValidatorAdapter<T>
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.validation.ValidatorAdapter<T>
-
- Type Parameters:
T
- type of validator's validatable
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IComponentAwareHeaderContributor
,IClusterable
,IValidator<T>
public class ValidatorAdapter<T> extends Behavior implements IValidator<T>
AdaptsIValidator
to Behavior- Author:
- igor
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidatorAdapter(IValidator<T> validator)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IValidator<T>
getValidator()
Gets adapted validatorvoid
validate(IValidatable<T> validatable)
Validates theIValidatable
instance.-
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 Detail
-
ValidatorAdapter
public ValidatorAdapter(IValidator<T> validator)
Constructor- Parameters:
validator
- validator to be adapted
-
-
Method Detail
-
validate
public void validate(IValidatable<T> validatable)
Validates theIValidatable
instance. Validation errors should be reported using theIValidatable.error(IValidationError)
method.- Specified by:
validate
in interfaceIValidator<T>
- Parameters:
validatable
- theIValidatable
instance being validated
-
getValidator
public IValidator<T> getValidator()
Gets adapted validator- Returns:
- validator
-
-