Expresso 5-5-0

com.jcorporate.expresso.services.controller.dbmaint
Class Add

java.lang.Object
  extended bycom.jcorporate.expresso.core.controller.State
      extended bycom.jcorporate.expresso.services.controller.dbmaint.DynamicCmd
          extended bycom.jcorporate.expresso.services.controller.dbmaint.GetBase
              extended bycom.jcorporate.expresso.services.controller.dbmaint.Add
All Implemented Interfaces:
Cloneable, Serializable

public class Add
extends GetBase

Displays a form for a new DBObject record.

This state does not actually perform the adding of the dbobject to the database, instead it creates a blank form that is pre-populated with the default values of the given DBObject.

The actual class that does the updating is AddUpdate

Version:
$Revision: 1.19 $ $Date: 2003/09/24 21:08:34 $
Author:
Michael Nash, contributions by Kevin King
See Also:
AddUpdate, Serialized Form

Field Summary
 
Fields inherited from class com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd
countTotalRecords, masterObjKey, showNext, showPrev
 
Fields inherited from class com.jcorporate.expresso.core.controller.State
NOTEMPTY_MASK, secure
 
Constructor Summary
Add()
           
Add(String stateName, String descrip)
          Default Constructor
 
Method Summary
protected  void autoField(String oneFieldName)
          Automatically handle a single field on the form.
 void run(ControllerRequest req, ControllerResponse res)
          Actually perform the setup and display of the form
 
Methods inherited from class com.jcorporate.expresso.services.controller.dbmaint.GetBase
addLookupTransition, displayValue, showForm
 
Methods inherited from class com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd
addParams, decode, getControllerName, getCurrentDBObj, getDataObject, getFieldsParam, getFixedFields, getKeyParameter, getMyDataObject, getPageNumber, getSearchParam, initializeDBObj, isKeyField, retrieveMyDBObject, setFields, setFieldsParam, setMyDataObject, setSearchParam, showBlobViewLink, showEditLink, showEditLink, showOptions, showUserName
 
Methods inherited from class com.jcorporate.expresso.core.controller.State
add, addAutoInput, addAutoInput, addAutoInput, addBlock, addError, addInput, addOptionalParameter, addOutput, addParameter, addParameter, addParameter, addParameter, addParameter, addRequiredParameter, addRequiredParameters, addTransition, autoValidate, autoValidate, calculateHandlerName, checkMask, checkParamMasks, clearFormCache, clone, equals, getAttribute, getController, getControllerRequest, getControllerResponse, getDataContext, getDBController, getDBName, getDescription, getErrors, getErrorState, getErrorTransition, getFileName, getFormCache, getHandlerName, getInitParameter, getName, getObjectParameter, getOptionalParameters, getOptionalParametersList, getParameter, getParameters, getPatternMatcher, getRequiredParametersList, getResponse, getReturnToSender, getSession, getStateFormClass, getString, getString, getSuccessTransition, getUid, getUser, isFileParameter, isParameter, isSecure, perform, saveErrors, setController, setDescription, setErrorState, setErrorTransition, setFormCache, setHandlerName, setMask, setMask, setMaskError, setName, setResponse, setReturnToSender, setSecure, setStateFormClass, setSuccessTransition, toString, transition, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Add

public Add()

Add

public Add(String stateName,
           String descrip)
Default Constructor

Parameters:
stateName - Name of the state
descrip - Friendly name of the state
Method Detail

autoField

protected void autoField(String oneFieldName)
                  throws DBException,
                         ControllerException
Automatically handle a single field on the form.

This function is called by the base class' autoList function, so it provides, in essence, a callback for rendering each DBObject field

Specified by:
autoField in class GetBase
Parameters:
oneFieldName - The name of the field
Throws:
DBException - If a problem occurs getting field info from the database object
ControllerException - upon error

run

public void run(ControllerRequest req,
                ControllerResponse res)
         throws NonHandleableException,
                ControllerException
Actually perform the setup and display of the form

Overrides:
run in class DynamicCmd
Parameters:
req - The ControllerRequest object
res - The ControllerResponse object
Throws:
NonHandleableException - upon error
ControllerException - upon error

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.