The <validator> element declares
the implementation class for a
validator.
Syntax
<validator>
[<description [xml:lang="lang"]>description</description>]*
[<display-name [xml:lang="lang"]>displayName</display-name>]*
[<icon [xml:lang="lang"]>
[<small-icon>iconPath</small-icon>]
[<large-icon>iconPath</large-icon>]
</icon>]*
<validator-id>validatorId</validator-id>
<validator-class>className</validator-class>
[<attribute>
[<description [xml:lang="lang"]>description</description>]*
[<display-name [xml:lang="lang"]>displayName</display-name>]*
[<icon [xml:lang="lang"]>
[<small-icon>iconPath</small-icon>]
[<large-icon>iconPath</large-icon>]
</icon>]*
<attribute-name>attrName</attribute-name>
<attribute-class>className</attribute-class>
[<default-value>defaultValue</default-value>]
[<suggested-value>suggestedValue</suggested-value>]
[<attribute-extension>extension</attribute-extension>]*
</attribute>]*
[<property>
[<description [xml:lang="lang"]>description</description>]*
[<display-name [xml:lang="lang"]>displayName</display-name>]*
[<icon [xml:lang="lang"]>
[<small-icon>iconPath</small-icon>]
[<large-icon>iconPath</large-icon>]
</icon>]*
<property-name>propName</property-name>
<property-class>className</property-class>
[<default-value>defaultValue</default-value>]
[<suggested-value>suggestedValue</suggested-value>]
[<property-extension>extension</property-extension>]*
</property>]*
</validator>
The <validator-id> element assigns a unique
identifier for the validator, and the
<validator-class> element contains the fully
qualified class name that implements the
javax.faces.validator.Validator interface:
<validator>
<validator-id>com.mycompany.MyValidator</converter-id>
<validator-class>
com.mycompany.jsf.MyValidator
</validator-class>
</validator>
The <attribute> and
<property> elements provide information
about the component's generic attributes and
type-safe converter properties, respectively, that may be used by a
development tool to help a developer use the validator, the same way
for the <component> element.
|