org.aspsimon.termcomp.infrastructure.validator
Class CompareFieldsValidator

java.lang.Object
  extended by org.aspsimon.termcomp.infrastructure.validator.CompareFieldsValidator
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.faces.validator.Validator

@Name(value="compareFieldsValidator")
@Validator
@Transactional
public class CompareFieldsValidator
extends java.lang.Object
implements javax.faces.validator.Validator, java.io.Serializable

This is a validator which checks two fields for equality. The field this validator is attached to MUST have the attribute compareTo set otherwise this will not work.

Version:
$Revision: 104 $
Author:
binabik
See Also:
Validator, Validator, Serialized Form

Field Summary
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
CompareFieldsValidator()
           
 
Method Summary
 void validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, java.lang.Object value)
          Implementation of Validator.validate(FacesContext, UIComponent, Object).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareFieldsValidator

public CompareFieldsValidator()
Method Detail

validate

public void validate(javax.faces.context.FacesContext facesContext,
                     javax.faces.component.UIComponent component,
                     java.lang.Object value)
              throws javax.faces.validator.ValidatorException
Implementation of Validator.validate(FacesContext, UIComponent, Object).

Specified by:
validate in interface javax.faces.validator.Validator
Parameters:
facesContext - FacesContext for the current request.
component - UIComponent being validated.
value - Value to check.
Throws:
javax.faces.validator.ValidatorException