org.apache.wicket.validation
Class ValidatorAdapter<T>

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.validation.ValidatorAdapter<T>
Type Parameters:
T - type of validator's validatable
All Implemented Interfaces:
java.io.Serializable, IClusterable, IComponentAwareEventSink, IComponentAwareHeaderContributor, IValidator<T>

public class ValidatorAdapter<T>
extends Behavior
implements IValidator<T>

Adapts IValidator to Behavior

Author:
igor
See Also:
Serialized Form

Constructor Summary
ValidatorAdapter(IValidator<T> validator)
          Constructor
 
Method Summary
 IValidator<T> getValidator()
          Gets adapted validator
 void validate(IValidatable<T> validatable)
          Validates the IValidatable instance.
 
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, renderHead, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 the IValidatable instance. Validation errors should be reported using the IValidatable.error(IValidationError) method.

Specified by:
validate in interface IValidator<T>
Parameters:
validatable - the IValidatable instance being validated

getValidator

public IValidator<T> getValidator()
Gets adapted validator

Returns:
validator


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.