• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to handle DynaValidatorActionForm in struts2

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Validations are checking automatic in this process.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again..

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

Regards
Harshani
 
reply
    Bookmark Topic Watch Topic
  • New Topic