File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes ActionForm View ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionForm View ?" Watch "ActionForm View ?" New topic

ActionForm View ?

Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
ActionForm is a bean along with reset() and validate() methods. Bean is a model but it's mentioned in all the books that ActionForm is a View component ?
Jaap v Hengstum

Joined: Apr 25, 2007
Posts: 6
A JavaBean class is nothing more than a Java class that follows certain conventions (such as it needs to have a no-argument constructor, properties must be prefixed with get and set, etc). JavaBean classes can act as reusable components in all kinds of situations. For example, in the case of a Struts ActionForm, because the ActionForm is a JavaBean, the inputs in the HTML form can be easily mapped to the properties in the ActionForm.

So while a MVC/Struts model is often a bean, a bean is not necessarily a MVC/Struts model.
[ May 15, 2007: Message edited by: Jaap v Hengstum ]
I agree. Here's the link:
subject: ActionForm View ?