• 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

DynaValidatorForms to JavaBean.

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I know about BeanUtils.copyProperties and this is fine when you need to copy your ActionForm class to a JavaBean, in my case, a persistant object for Hibernate.

But what if you are using the DynaValidatorForm? How do I go about getting those into my persistant class without calling a set method for each property? Is there an easy way? Or would I be better off using ActionForms of my own and not using Dyna...in this case?

Thanks.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me ammend this with a simpler question. If I use a DynaValidatorForm instead of my own ActionForm, how do I retrieve a value from the DVF in my action?

For example, if I have this:



How do I get the value for pcModel? do I just pull it out of the request or is there a different/better way?
[ August 10, 2004: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, nevermind. I casted the form object to a DynaActionForm object and used the get() method.
reply
    Bookmark Topic Watch Topic
  • New Topic