An ActionForm is a JavaBean optionally associated with
one or more ActionMappings. Such a bean will have had its
properties initialized from the corresponding request parameters before
the corresponding Action.execute method is called.
When the properties of this bean have been populated, but before the
execute method of the Action is called, this bean's
validate method will be called, which gives the bean a chance
to verify that the properties submitted by the user are correct and valid.
If this method finds problems, it returns an error messages object that
encapsulates those problems, and the controller servlet will return control
to the corresponding input form. Otherwise, the validate
method returns null, indicating that everything is acceptable
and the corresponding Action.execute method should be
called.
This class must be subclassed in order to be instantiated. Subclasses
should provide property getter and setter methods for all of the bean
properties they wish to expose, plus override any of the public or
protected methods for which they wish to provide modified functionality.
Because ActionForms are JavaBeans, subclasses should also implement
Serializable, as required by the JavaBean specification.
Some containers require that an object meet all JavaBean requirements
in order to use the introspection API upon which ActionForms rely.
An ActionForm is a JavaBean optionally associated with one or more
ActionMappings. Such a bean will have had its properties initialized from the corresponding request parameters before the correspondingAction.executemethod is called.When the properties of this bean have been populated, but before the
executemethod of theActionis called, this bean'svalidatemethod will be called, which gives the bean a chance to verify that the properties submitted by the user are correct and valid. If this method finds problems, it returns an error messages object that encapsulates those problems, and the controller servlet will return control to the corresponding input form. Otherwise, thevalidatemethod returnsnull, indicating that everything is acceptable and the correspondingAction.executemethod should be called.This class must be subclassed in order to be instantiated. Subclasses should provide property getter and setter methods for all of the bean properties they wish to expose, plus override any of the public or protected methods for which they wish to provide modified functionality.
Because ActionForms are JavaBeans, subclasses should also implement
Serializable, as required by the JavaBean specification. Some containers require that an object meet all JavaBean requirements in order to use the introspection API upon which ActionForms rely.