org.davesag.generica.servlet.form
Class GenericForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended byorg.apache.struts.action.DynaActionForm
          extended byorg.apache.struts.validator.DynaValidatorForm
              extended byorg.davesag.generica.servlet.form.GenericForm
All Implemented Interfaces:
DynaBean, Serializable
Direct Known Subclasses:
UploadForm, UserProfileForm

public class GenericForm
extends DynaValidatorForm

The GenericForm is used as a general purpose data carrier that passes off the actual work of form population to a FormController specified in the ActionMapping parameter. The ActionMapping parameter must contain params
pipe= somepipename;form-controller= eg.classname

Since:
Generica 1.0
Version:
CVS Revision $Id: GenericForm.java,v 1.8 2004/03/30 10:12:58 norm Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.validator.DynaValidatorForm
page, validatorResults
 
Fields inherited from class org.apache.struts.action.DynaActionForm
dynaClass, dynaValues
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
GenericForm()
           
 
Method Summary
 FormController getController(String controllerclass)
          Gets the FormController to be used by this form.
 FormController getController(String controllerclass, HttpServletRequest request)
          Gets the FormController to be used by this form.
 void reset(ActionMapping mapping, HttpServletRequest request)
          resets the form details based on the preloaded object in the Pipe.
 
Methods inherited from class org.apache.struts.validator.DynaValidatorForm
getPage, getResultValueMap, getValidatorResults, log, log, setPage, setValidatorResults, validate
 
Methods inherited from class org.apache.struts.action.DynaActionForm
contains, get, get, get, getDynaClass, getDynaProperty, getMap, initialize, isDynaAssignable, remove, reset, set, set, set, toString
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.commons.beanutils.DynaBean
contains, get, get, get, getDynaClass, remove, set, set, set
 

Constructor Detail

GenericForm

public GenericForm()
Method Detail

reset

public void reset(ActionMapping mapping,
                  HttpServletRequest request)
resets the form details based on the preloaded object in the Pipe.

Parameters:
mapping - - used to get the form name, and thus load the correct Pipe.
request - - used to access the session.

getController

public FormController getController(String controllerclass)
                             throws ClassNotFoundException
Gets the FormController to be used by this form.

Parameters:
controllerclass - The fully qualified class name of the FormController.
Returns:
The FormController.
Throws:
ClassNotFoundException - if the controllerclass can not be instantiated.

getController

public FormController getController(String controllerclass,
                                    HttpServletRequest request)
                             throws ClassNotFoundException
Gets the FormController to be used by this form.

Parameters:
controllerclass - The fully qualified class name of the FormController.
request - The Servlet Request.
Returns:
The FormController.
Throws:
ClassNotFoundException - if the controllerclass can not be instantiated.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.