org.apache.myfaces.taglib.core
Class GenericMinMaxValidatorTag<T>

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.faces.webapp.ValidatorELTag
          extended by org.apache.myfaces.taglib.core.ValidatorTag
              extended by org.apache.myfaces.taglib.core.GenericMinMaxValidatorTag<T>
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
ValidateDoubleRangeTag, ValidateLengthTag, ValidateLongRangeTag

public abstract class GenericMinMaxValidatorTag<T>
extends ValidatorTag

This is the base Tag for all ValidatorTags which got a minimum and a maimum attribute.

Since:
1.2
Version:
$Revision: 684465 $ $Date: 2008-08-10 06:38:21 -0500 (Sun, 10 Aug 2008) $
Author:
Andreas Berger (latest modification by $Author: skitching $)
See Also:
Serialized Form

Field Summary
protected  T _max
           
protected  javax.el.ValueExpression _maximum
           
protected  T _min
           
protected  javax.el.ValueExpression _minimum
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GenericMinMaxValidatorTag()
           
 
Method Summary
protected  Validator createValidator()
          This method returns the Validator, you have to cast it to the correct type and apply the min and max values.
protected abstract  T getValue(Object value)
          Wrapper method.
protected abstract  boolean isMinLTMax()
           
 void release()
           
 void setMaximum(javax.el.ValueExpression maximum)
           
 void setMinimum(javax.el.ValueExpression minimum)
           
 
Methods inherited from class org.apache.myfaces.taglib.core.ValidatorTag
setBinding, setValidatorId, setValidatorIdString
 
Methods inherited from class javax.faces.webapp.ValidatorELTag
doStartTag
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_minimum

protected javax.el.ValueExpression _minimum

_maximum

protected javax.el.ValueExpression _maximum

_min

protected T _min

_max

protected T _max
Constructor Detail

GenericMinMaxValidatorTag

public GenericMinMaxValidatorTag()
Method Detail

setMinimum

public void setMinimum(javax.el.ValueExpression minimum)

setMaximum

public void setMaximum(javax.el.ValueExpression maximum)

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class ValidatorTag

createValidator

protected Validator createValidator()
                             throws javax.servlet.jsp.JspException
This method returns the Validator, you have to cast it to the correct type and apply the min and max values.

Overrides:
createValidator in class ValidatorTag
Returns:
Throws:
javax.servlet.jsp.JspException

isMinLTMax

protected abstract boolean isMinLTMax()
Returns:
true if min is lower than max

getValue

protected abstract T getValue(Object value)
Wrapper method.

Parameters:
value -
Returns:


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.