[EMAIL PROTECTED] schrieb:
Hi, i try to set a default property for a converter in this way:
<validator>
<validator-id>xyValidtor</validator-name>
<validator-class>com.xy.XyValidator</validator-class>
<property>
<property-name>length</property-name>
<property-class>java.lang.Integer</property>
<default-value>40</default-value>
</property>
</validator>
I expected that setter-Methode of my Member length in the
XyValidator-Class will called, but only the
default Constructor is called, so why fails my setting of a
Default-Property?
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.
What you can do is use the validator attribute available on all input
elements:
<h:inputText validator="#{....}" .../>
That EL expression can then get an object from your "managed beans"
definitions, which does support setting properties etc.
Regards, Simon