org.jboss.seam.ui.validator
Class EqualityValidator

java.lang.Object
  extended by org.jboss.seam.ui.validator.EqualityValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class EqualityValidator
extends java.lang.Object
implements javax.faces.validator.Validator, javax.faces.component.StateHolder

Validate two fields are equal

Author:
pmuir, Daniel Roth

Field Summary
static java.lang.String MESSAGE_ID
           
static java.lang.String VALIDATOR_ID
           
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
EqualityValidator()
           
EqualityValidator(java.lang.String forId)
           
EqualityValidator(java.lang.String forId, java.lang.String message, java.lang.String messageId, java.lang.String operator)
           
 
Method Summary
 java.lang.String getFor()
           
 java.lang.String getMessage()
           
 java.lang.String getMessageId()
           
 org.jboss.seam.ui.validator.EqualityValidator.ValidOperation getOperator()
           
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setFor(java.lang.String forId)
           
 void setMessage(java.lang.String message)
           
 void setMessageId(java.lang.String messageId)
           
 void setOperator(org.jboss.seam.ui.validator.EqualityValidator.ValidOperation operator)
           
 void setTransient(boolean newTransientValue)
           
 void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_ID

public static final java.lang.String MESSAGE_ID
See Also:
Constant Field Values

VALIDATOR_ID

public static final java.lang.String VALIDATOR_ID
See Also:
Constant Field Values
Constructor Detail

EqualityValidator

public EqualityValidator()

EqualityValidator

public EqualityValidator(java.lang.String forId)

EqualityValidator

public EqualityValidator(java.lang.String forId,
                         java.lang.String message,
                         java.lang.String messageId,
                         java.lang.String operator)
Method Detail

validate

public void validate(javax.faces.context.FacesContext context,
                     javax.faces.component.UIComponent component,
                     java.lang.Object value)
              throws javax.faces.validator.ValidatorException
Specified by:
validate in interface javax.faces.validator.Validator
Throws:
javax.faces.validator.ValidatorException

getFor

public java.lang.String getFor()

setFor

public void setFor(java.lang.String forId)

getMessage

public java.lang.String getMessage()

setMessage

public void setMessage(java.lang.String message)

getMessageId

public java.lang.String getMessageId()

setMessageId

public void setMessageId(java.lang.String messageId)

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface javax.faces.component.StateHolder

getOperator

public org.jboss.seam.ui.validator.EqualityValidator.ValidOperation getOperator()

setOperator

public void setOperator(org.jboss.seam.ui.validator.EqualityValidator.ValidOperation operator)


Copyright © 2011 JBoss. All Rights Reserved.