@JSFJspTag(name="f:validator", bodyContent="empty") public class ValidatorImplTag extends ValidatorELTag
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.
Constructor and Description |
---|
ValidatorImplTag() |
Modifier and Type | Method and Description |
---|---|
protected Validator |
createClassicValidator() |
protected 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(String validatorIdString)
Use this method to specify the validatorId programmatically.
|
doStartTag
@JSFJspAttribute(className="javax.el.ValueExpression", deferredValueType="java.lang.String") public void setValidatorId(javax.el.ValueExpression validatorId)
@JSFJspAttribute(className="javax.el.ValueExpression", deferredValueType="javax.faces.validator.Validator") public void setBinding(javax.el.ValueExpression binding)
public void setValidatorIdString(String validatorIdString)
validatorIdString
- public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
protected Validator createValidator() throws javax.servlet.jsp.JspException
createValidator
in class ValidatorELTag
javax.servlet.jsp.JspException
protected Validator createClassicValidator() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
Copyright © 2020 The Apache Software Foundation. All rights reserved.