• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic