org.apache.wicket.markup.html.form.validation
Class EqualInputValidator

java.lang.Object
  extended by org.apache.wicket.markup.html.form.validation.AbstractFormValidator
      extended by org.apache.wicket.markup.html.form.validation.EqualInputValidator
All Implemented Interfaces:
Serializable, IClusterable, IFormValidator
Direct Known Subclasses:
EqualPasswordInputValidator

public class EqualInputValidator
extends AbstractFormValidator

Validates that the input of two form components is identical. Errors are reported on the second form component with key 'EqualInputValidator' and the variables:

Author:
Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Constructor Summary
EqualInputValidator(FormComponent<?> formComponent1, FormComponent<?> formComponent2)
          Construct.
 
Method Summary
 FormComponent<?>[] getDependentFormComponents()
           
 void validate(Form<?> form)
          This method is ran if all components returned by IFormValidator.getDependentFormComponents() are valid.
 
Methods inherited from class org.apache.wicket.markup.html.form.validation.AbstractFormValidator
error, error, error, error, messageModel, resourceKey, variablesMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualInputValidator

public EqualInputValidator(FormComponent<?> formComponent1,
                           FormComponent<?> formComponent2)
Construct.

Parameters:
formComponent1 - a form component
formComponent2 - a form component
Method Detail

getDependentFormComponents

public FormComponent<?>[] getDependentFormComponents()
Returns:
array of FormComponents that this validator depends on
See Also:
IFormValidator.getDependentFormComponents()

validate

public void validate(Form<?> form)
Description copied from interface: IFormValidator
This method is ran if all components returned by IFormValidator.getDependentFormComponents() are valid.

Parameters:
form - form this validator is added to
See Also:
IFormValidator.validate(org.apache.wicket.markup.html.form.Form)


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