aspose file tools*
The moose likes Struts and the fly likes Difference Between ActionForm and ActionFormBean ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference Between ActionForm and ActionFormBean ?" Watch "Difference Between ActionForm and ActionFormBean ?" New topic
Author

Difference Between ActionForm and ActionFormBean ?

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Hi,

Just wondering if you could help me out in differentiating between ActionForm and ActionFormBean classes and where they are called in a framework. If Possible please help me with some links or examples for the same.

Thanks,
Rahul Juneja


Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Clifford Adams
Ranch Hand

Joined: May 12, 2004
Posts: 50
I am very new to struts myself, but I believe they are the same thing. ActionForm is actually a bean, and since the work 'action' is used so much in struts, it is easy for us newbies to get confused, so some people call it ActionFormBean just to reinforce the fact that it is a bean.
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Boss ! I think Its not the right Track because ActionForm and ActionFormBean are truly 2 different Classes.

Thanks,
Rahul Juneja
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

If you ever hear someone say "ActionFormBean" you can assume that they mean "ActionForm".

There IS an ActionFormBean class but it is being replaced by FormBeanConfig. All it does is hold the configuration information of the ActionForms defined in struts-config. It's something behind the scenes of the framework and you probably won't ever have to worry about it.


A good workman is known by his tools.
Venkatraman Kandaswamy
Ranch Hand

Joined: Jul 07, 2004
Posts: 120
Just to add more info - ActionForm is a class that your bean should extend to get the ActionFormBeanness in it. So your bean gets some special properties - when the form submits the bean is automatically populated with the matching form fields.

Repeat after me.

There is no spoon.
There is no ActionFormBean class.

--Venkat


--Venkatraman<br />SCJP 1.4<br /><a href="http://kvrlogs.blogspot.com" target="_blank" rel="nofollow">blog</a>
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Hi guys,

But the only thing that is Running me mad is in Our Project I have just joined and they have both ActionForm and ActionFormBean Classes. So can you suggest me some more hints.

Thanks,
Rahul Juneja
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Hint #1
a) Look at the Javadoc of some of the classes that extend ActionFormBean.
b) Observe the name of the author.
c) Hunt this person down.

Hint #2
a) Download the Struts source.
b) Read up on ActionFormBean and FormBeanConfig.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference Between ActionForm and ActionFormBean ?
 
Similar Threads
ActionForm vs ActionFormBean
ActionFormBean
Strange URL redirect (ActionFormBean Scope Problems )
send two or more Actionformbean Urgent!!!!! plz.....
Cannot find ActionMapping or ActionFormBean