• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Difference Between ActionForm and ActionFormBean ?

 
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
 
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
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • 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.
 
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
Posts: 4727
Mac VI Editor Ruby
  • 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.
 
On top of spaghetti all covered in cheese, there was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic