• 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

Regarding ActionForm in Struts

 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I'm new to Struts Framwork.

I have read regarding ActionForm that

"An intersting thing (about ActionForm) is that you can declare the same ActionForm class any number of times provided each entry has a unique name associated with it"


I do not know how can it be possible that you are using same Action Form more than once and with unique name. Can anyone please explain me with example (if possible) how could above statement be true.

Thanks in Advance.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's as simple as it sounds; when you declare an action form you're associating a class with a name. You can use the same class as much as you want, because it's instantiated under the given name. That's how we can use any number of dyna forms: each dyna form is the same class, but under a different name.
 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David Thanks for your reply.

You have mentioned that


when you declare an action form you're associating a class with a name



By your above statement your mean to say that in struts-config.xml, what we are decalring <form-beans> tags.

And i think we are declaring dynaforms in struts-config.xml , am i right about this?

Thanks.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes.
 
reply
    Bookmark Topic Watch Topic
  • New Topic