Foundation
Project Documentation

Summary

Tag name: <tr:validator>

The validator tag is an implementation of the future JSF 1.2 <f:validator> tag that supports a "binding" attribute.

This tag must be used inside an EditableValueHolder component. it adds a Validator instance to the parent UIComponent. The "validatorId" and/or "binding" attribute(s) must be specified. If "binding" is non-null, then the ValueBinding is evaluated to produce a Validator. If the Validator is non-null it is added to the component; otherwise, a Validator is located using the "validatorId". This Validator is added to the component and also assigned to the "binding" ValueBinding.

Example:

            <tr:inputText value="#{mybean.ename}">
              <tr:validator binding="#{mybean.validator"/>
            </tr:inputText>

Attributes

Name Type Supports EL? Description
binding org.apache.myfaces.trinidad.component.UIXValidator Only EL A ValueBinding that evaluates to an object that implements javax.faces.validator.Validator.
validatorId String No Validator identifier of the validator to be created.