aspose file tools*
The moose likes Struts and the fly likes Regarding ActionForm in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding ActionForm in Struts" Watch "Regarding ActionForm in Struts" New topic
Author

Regarding ActionForm in Struts

Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
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.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 08, 2008
Posts: 214
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
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding ActionForm in Struts
 
Similar Threads
Data across multiple actions
populating forms, sry :(
Setting up form data
Use form bean in more than one action method
Regarding ActionForm in Struts