org.apache.myfaces.tobago.validator
Class SubmittedValueLengthValidator

java.lang.Object
  extended by javax.faces.validator.LengthValidator
      extended by org.apache.myfaces.tobago.validator.SubmittedValueLengthValidator
All Implemented Interfaces:
EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class SubmittedValueLengthValidator
extends javax.faces.validator.LengthValidator

SubmittedLengthValidator is a Validator that checks the number of characters in the submitted value of the associated component.


Field Summary
static String VALIDATOR_ID
           
 
Fields inherited from class javax.faces.validator.LengthValidator
MAXIMUM_MESSAGE_ID, MINIMUM_MESSAGE_ID
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
SubmittedValueLengthValidator()
           
SubmittedValueLengthValidator(int maximum)
           
SubmittedValueLengthValidator(int maximum, int minimum)
           
 
Method Summary
 boolean equals(Object o)
           
 int getMaximum()
           
 int getMinimum()
           
 int hashCode()
           
 void restoreState(javax.faces.context.FacesContext context, Object state)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setMaximum(int maximum)
           
 void setMinimum(int minimum)
           
 void validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object value)
           
 
Methods inherited from class javax.faces.validator.LengthValidator
isTransient, setTransient
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID

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

SubmittedValueLengthValidator

public SubmittedValueLengthValidator()

SubmittedValueLengthValidator

public SubmittedValueLengthValidator(int maximum)

SubmittedValueLengthValidator

public SubmittedValueLengthValidator(int maximum,
                                     int minimum)
Method Detail

getMinimum

public int getMinimum()
Overrides:
getMinimum in class javax.faces.validator.LengthValidator

setMinimum

public void setMinimum(int minimum)
Overrides:
setMinimum in class javax.faces.validator.LengthValidator

getMaximum

public int getMaximum()
Overrides:
getMaximum in class javax.faces.validator.LengthValidator

setMaximum

public void setMaximum(int maximum)
Overrides:
setMaximum in class javax.faces.validator.LengthValidator

validate

public void validate(javax.faces.context.FacesContext facesContext,
                     javax.faces.component.UIComponent uiComponent,
                     Object value)
              throws javax.faces.validator.ValidatorException
Specified by:
validate in interface javax.faces.validator.Validator
Overrides:
validate in class javax.faces.validator.LengthValidator
Throws:
javax.faces.validator.ValidatorException

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.validator.LengthValidator

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.validator.LengthValidator

equals

public boolean equals(Object o)
Overrides:
equals in class javax.faces.validator.LengthValidator

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.