org.apache.myfaces.taglib.core
Class ValidatorImplTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.faces.webapp.ValidatorELTag
org.apache.myfaces.taglib.core.ValidatorImplTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
@JSFJspTag(name="f:validator",
bodyContent="empty")
public class ValidatorImplTag
- extends javax.faces.webapp.ValidatorELTag
Creates a validator and associates it with the nearest parent UIComponent.
During the validation phase (or the apply-request-values
phase for immediate components), if the associated component has any
submitted value and the conversion of that value to the required
type has succeeded then the specified validator type is
invoked to test the validity of the converted value.
Commonly associated with an h:inputText entity, but may be applied to
any input component.
Some validators may allow the component to use attributes to define
component-specific validation constraints; see the f:attribute tag.
See also the "validator" attribute of all input components, which
allows a component to specify an arbitrary validation <i>method</i>
(rather than a registered validation type, as this tag does).
Unless otherwise specified, all attributes accept static values
or EL expressions.
- Version:
- $Revision: 693358 $ $Date: 2008-09-08 22:54:29 -0500 (Mon, 08 Sep 2008) $
- Author:
- Leonardo Uribe (latest modification by $Author: lu4242 $)
- See Also:
- Serialized Form
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 |
Method Summary |
protected javax.faces.validator.Validator |
createClassicValidator()
|
protected javax.faces.validator.Validator |
createValidator()
|
void |
release()
|
void |
setBinding(javax.el.ValueExpression binding)
A ValueExpression that evaluates to an implementation of
the javax.faces.validator.Validator interface. |
void |
setValidatorId(javax.el.ValueExpression validatorId)
The registered ID of the desired Validator. |
void |
setValidatorIdString(java.lang.String validatorIdString)
Use this method to specify the validatorId programmatically. |
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 |
ValidatorImplTag
public ValidatorImplTag()
setValidatorId
@JSFJspAttribute(rtexprvalue=true,
className="java.lang.String")
public void setValidatorId(javax.el.ValueExpression validatorId)
- The registered ID of the desired Validator.
setBinding
@JSFJspAttribute(rtexprvalue=true,
className="javax.faces.validator.Validator")
public void setBinding(javax.el.ValueExpression binding)
- A ValueExpression that evaluates to an implementation of
the javax.faces.validator.Validator interface.
setValidatorIdString
public void setValidatorIdString(java.lang.String validatorIdString)
- Use this method to specify the validatorId programmatically.
- Parameters:
validatorIdString
-
release
public void release()
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class javax.servlet.jsp.tagext.TagSupport
createValidator
protected javax.faces.validator.Validator createValidator()
throws javax.servlet.jsp.JspException
- Specified by:
createValidator
in class javax.faces.webapp.ValidatorELTag
- Throws:
javax.servlet.jsp.JspException
createClassicValidator
protected javax.faces.validator.Validator createClassicValidator()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.