yvk
Oct 26th, 2006, 03:12 AM
Hi All,
Iam using built-in Validator(org.apringframework.validation.Validator ) interface in springs framework for server side validation.
For that I used to define ...
<bean id="editempdetailsController" class="emp.EditempdetailsController">
<property name="commandName"><value>editempdetailsform</value></property>
<property name="commandClass"><value>emp.EditempdetailsForm</value></property>
<property name="formView"><value>editempdetails</value></property>
<property name="validator"><ref bean="editempdetailsValidator"/></property>
<property name="dao" ref="empDAO"/>
</bean>
in my app-servlet.xml...
It worked properly...
But now I want to use client side validation combined with the Server side validation defined above.
I though using spring modules integration with apache commons-validator for client side validation.
I read somewhere that we have to define in app-servlet.xml
<property name="validator" ref="beanValidator"/>
Then my app-servlet.xml looks like...
<bean id="editempdetailsController" class="emp.EditempdetailsController">
<property name="commandName"><value>editempdetailsform</value></property>
<property name="commandClass"><value>emp.EditempdetailsForm</value></property>
<property name="formView"><value>editempdetails</value></property>
<property name="validator"><ref bean="editempdetailsValidator"/></property>
<property name="validator" ref="beanValidator"/>
<property name="dao" ref="empDAO"/>
</bean>
can I mix both spring built-in validator support with spring modules integration with apache commons-validator for client side validation?
Which one takes place first?
Thanks,
yvk
Iam using built-in Validator(org.apringframework.validation.Validator ) interface in springs framework for server side validation.
For that I used to define ...
<bean id="editempdetailsController" class="emp.EditempdetailsController">
<property name="commandName"><value>editempdetailsform</value></property>
<property name="commandClass"><value>emp.EditempdetailsForm</value></property>
<property name="formView"><value>editempdetails</value></property>
<property name="validator"><ref bean="editempdetailsValidator"/></property>
<property name="dao" ref="empDAO"/>
</bean>
in my app-servlet.xml...
It worked properly...
But now I want to use client side validation combined with the Server side validation defined above.
I though using spring modules integration with apache commons-validator for client side validation.
I read somewhere that we have to define in app-servlet.xml
<property name="validator" ref="beanValidator"/>
Then my app-servlet.xml looks like...
<bean id="editempdetailsController" class="emp.EditempdetailsController">
<property name="commandName"><value>editempdetailsform</value></property>
<property name="commandClass"><value>emp.EditempdetailsForm</value></property>
<property name="formView"><value>editempdetails</value></property>
<property name="validator"><ref bean="editempdetailsValidator"/></property>
<property name="validator" ref="beanValidator"/>
<property name="dao" ref="empDAO"/>
</bean>
can I mix both spring built-in validator support with spring modules integration with apache commons-validator for client side validation?
Which one takes place first?
Thanks,
yvk