Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference Between ActionForm and ActionFormBean ?

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Clifford Adams
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Venkatraman Kandaswamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic