my dog learned polymorphism*
The moose likes Struts and the fly likes How to handle DynaValidatorActionForm in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to handle DynaValidatorActionForm in struts2" Watch "How to handle DynaValidatorActionForm in struts2" New topic
Author

How to handle DynaValidatorActionForm in struts2

Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
Hi..
In my struts1 applicaation there are DynaValidatorActionForms. How can I handle those in struts2?

---------------------------------------------------------------------

eg: <form-bean name="personForm" type="org.apache.struts.validator.DynaValidatorActionForm">

<form-property name="id" type="java.lang.Long"/>

<form-property name="firstName" type="java.lang.String"/>

<form-property name="lastName" type="java.lang.String"/>


</form-bean>

Thanks in advance
Harshani
sitaram
Greenhorn

Joined: Jan 24, 2008
Posts: 26
Validations are checking automatic in this process.
rajan Kayarohanam
Greenhorn

Joined: Jan 24, 2008
Posts: 12
hi,
The validations can be done by the same way its done in the normal forms.
either you can use the Action class for the validations where you have to return the action errors by

Or the other way is to have the validations in the validations.xml file with the name as the formName.

Hope this will be useful for you.

Regards,
KMR
Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
Hi Raj and Sitaramayya,

Thank you very much for the reply....

Regards
Harshani
Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
Hi again..

Can anyone please tell me what is the difference between DynaValidatorActionForm and DynaActionForm?

Regards
Harshani
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to handle DynaValidatorActionForm in struts2
 
Similar Threads
dynaValidatorForm Bean Parent/children config question
I am getting error when starting Tomcat .How can I rectify it?
Struts Validator Plug-In Framework
Struts validation framework- for single form, multiple actions
Problem with validator