Hi, 

I have defined a validator in my faces-config.xml that contains a parameter
I'd like to set to enable different validators to apply different logic.

Something like this, 
  <validator>
  <validator-id>BasicValidator</validator-id>
  <validator-class>com.stuff.web.ValidatorImpl</validator-class>
   <property>
   <property-name>validationMode</property-name>
   <property-class>java.lang.String</property-class>
   <default-value>basic</default-value>
  </property>
 </validator>
<validator>
  <validator-id>HiTecValidator</validator-id>
  <validator-class>com.stuff.web.ValidatorImpl</validator-class>
   <property>
   <property-name>validationMode</property-name>
   <property-class>java.lang.String</property-class>
   <default-value>hiTec</default-value>
  </property>
 </validator>

When the application is loaded, these parameters are set (managed by the IOC
framework), however, when my page is reloaded, the state manager is trying
to restore the state, fails and invokes class.newInstance() at this point it
is not managed by the framework, and the property is not set.
Is this a known bug or am I making a simple mistake (I have found no example
of this functionality anywhere, at leats not in newsgroups or on-line
documentation)

regards
/Johan
--
View this message in context: 
http://www.nabble.com/Validator-parameters-t1404598.html#a3780448
Sent from the MyFaces - Users forum at Nabble.com.

Reply via email to