org.apache.shale.validator.faces
Class ValidatorTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.faces.webapp.ValidatorTag
          extended by org.apache.shale.validator.faces.ValidatorTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class ValidatorTag
extends javax.faces.webapp.ValidatorTag

The tag class for the s:commonsValidator tag. $Id: ValidatorTag.java 481413 2006-12-01 21:48:06Z rahul $

See Also:
Serialized Form

Field Summary
 
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
ValidatorTag()
          This constructor obtains a reference to the tag utility object, which is a JSF managed bean.
 
Method Summary
 void addParam(String name, String value)
          Adds a parameter to pass to the Commons Validator that will be used.
 javax.faces.validator.Validator createValidator()
          Create a validator by calling super.createValidator().
 int doEndTag()
          Executes the code that was skipped in the doStartTag() override.
 int doStartTag()
          Overridden to prevent the call to createValidator() from occurring here.
 void release()
          Sets all instance objects representing tag attribute values to null.
 void setArg(String newValue)
          Setter method for the arg attribute.
 void setClient(String newValue)
          Setter method for the client attribute.
 void setDatePatternStrict(String newValue)
          Setter method for the setDatePatternStrict attribute.
 void setMask(String newValue)
          Setter method for the mask attribute.
 void setMax(String newValue)
          Setter method for the max attribute.
 void setMaxlength(String newValue)
          Setter method for the maxlength attribute.
 void setMessage(String newValue)
          Setter method for the message attribute.
 void setMin(String newValue)
          Setter method for the min attribute.
 void setMinlength(String newValue)
          Setter method for the minlength attribute.
 void setServer(String newValue)
          Setter method for the server attribute.
 void setType(String newValue)
          Setter method for the type attribute.
 
Methods inherited from class javax.faces.webapp.ValidatorTag
setValidatorId
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, 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
 

Constructor Detail

ValidatorTag

public ValidatorTag()

This constructor obtains a reference to the tag utility object, which is a JSF managed bean.

Method Detail

setType

public void setType(String newValue)

Setter method for the type attribute.

Parameters:
newValue - the new attribute value

setMin

public void setMin(String newValue)

Setter method for the min attribute.

Parameters:
newValue - the new attribute value

setMax

public void setMax(String newValue)

Setter method for the max attribute.

Parameters:
newValue - the new attribute value

setMinlength

public void setMinlength(String newValue)

Setter method for the minlength attribute.

Parameters:
newValue - the new attribute value

setMaxlength

public void setMaxlength(String newValue)

Setter method for the maxlength attribute.

Parameters:
newValue - the new attribute value

setDatePatternStrict

public void setDatePatternStrict(String newValue)

Setter method for the setDatePatternStrict attribute.

Parameters:
newValue - the new attribute value

setMask

public void setMask(String newValue)

Setter method for the mask attribute.

Parameters:
newValue - the new attribute value

setMessage

public void setMessage(String newValue)

Setter method for the message attribute.

Parameters:
newValue - the new attribute value

setArg

public void setArg(String newValue)

Setter method for the arg attribute.

Parameters:
newValue - the new attribute value

setClient

public void setClient(String newValue)

Setter method for the client attribute.

Parameters:
newValue - the new attribute value

setServer

public void setServer(String newValue)

Setter method for the server attribute.

Parameters:
newValue - the new attribute value

addParam

public void addParam(String name,
                     String value)

Adds a parameter to pass to the Commons Validator that will be used.

Parameters:
name - the name of the parameter to pass to the validator.
value - the value of the parameter to pass to the validator.

doStartTag

public int doStartTag()
               throws JspException

Overridden to prevent the call to createValidator() from occurring here.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class javax.faces.webapp.ValidatorTag
Returns:
EVAL_BODY_INCLUDE
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException

Executes the code that was skipped in the doStartTag() override.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class TagSupport
Throws:
JspException - if a JSP processing error occurs

createValidator

public javax.faces.validator.Validator createValidator()
                                                throws JspException

Create a validator by calling super.createValidator(). This method initializes that validator with the tag's attribute values.

Overrides:
createValidator in class javax.faces.webapp.ValidatorTag
Throws:
JspException - if a JSP processing error occurs

release

public void release()

Sets all instance objects representing tag attribute values to null.

Specified by:
release in interface Tag
Overrides:
release in class javax.faces.webapp.ValidatorTag


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