This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to handle DynaValidatorActionForm in struts2

 
Harshani Wickramarathna
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Validations are checking automatic in this process.
 
rajan Kayarohanam
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raj and Sitaramayya,

Thank you very much for the reply....

Regards
Harshani
 
Harshani Wickramarathna
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again..

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

Regards
Harshani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic