Volker Weber schrieb:
Hi simon,
2008/7/10 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
[...]
The JSF standard does not support this. When defining a validator in a
faces-config.xml file, the only supported xml elements are validator-id and
validator-class.
[...]
The http://java.sun.com/dtd/web-facesconfig_1_1.dtd support property
on validator:
<!--
The "validator" element represents a concrete Validator implementation
class that should be registered under the specified validator identifier.
Validator identifiers must be unique within the entire web application.
Nested "attribute" elements identify generic attributes that may be
configured on the corresponding UIComponent in order to affect the
operation of the Validator. Nested "property" elements identify JavaBeans
properties of the Validator implementation class that may be configured
to affect the operation of the Validator.
-->
<!ELEMENT validator (description*, display-name*, icon*,
validator-id, validator-class, attribute*, property*)>
Ah, I didn't know that.
It appears that whoever implemented the faces-config parsing didn't know
that either. Here's code from DigesterFacesConfigUnmarshallerImpl.java
(core/trunk12):
digester.addCallMethod("faces-config/validator", "addValidator", 2);
digester.addCallParam("faces-config/validator/validator-id", 0);
digester.addCallParam("faces-config/validator/validator-class", 1);
So it looks like at the moment the only supported child elements of
<validator> are validator-id and validator-class.
Note that in the same method, the <converter> tag does appear to be
handled correctly, with digester rules existing for nested attribute and
property elements.
Just by the way, the subject on the original email was about
"converter", but the example was about "validator". I presume the
problem really is with a validator....
Regards,
Simon