IRISLIB database
AutoForm Class Reference

This class is used internally by InterSystems IRIS. More...

Inheritance diagram for AutoForm:

Public Member Functions

_.Library.Status OnSubmit (_.Library.String pID, _.Library.String pSubmit)
 This callback is called when this form is submitted. More...
 

Static Public Member Functions

_.CSP.Util.AutoForm CreateInstance (_.Library.String pID)
 Create an instance of the AutoForm object using the provided ID value(s). More...
 
_.Library.Status DispatchSubmit (_.Library.String pSubmit)
 This method invokes a submit on the appropriate form class. More...
 
_.Library.String DoSubmit ()
 Common expiration date used for cookies. More...
 
 DrawFormButtons (_.CSP.Util.FormButton pButtons)
 Draw the buttons for a form...
 
_.Library.Status DrawHTMLForm (_.Library.RegisteredObject pObj, _.Library.String pID, _.Library.String pActionURL, _.CSP.Util.FormButton pButtons, _.Library.String pTarget)
 Draw an HTML form for this form object. More...
 
_.Library.Status DrawHTMLTable (_.Library.RegisteredObject pObj, _.Library.String pID)
 Draw an HTML detail table for this form object. More...
 
_.Library.String GetComboBoxHTML (_.Library.String pValue, _.Library.String pName, _.Library.String pClass, _.Library.String pQuery, _.Library.String pCaptionColumn, _.Library.String pValueColumn, _.Library.String pP1, _.Library.String pP2, _.Library.String pP3)
 Construct an HTML string defining a combo box for the given query. More...
 
_.Library.String GetFormError ()
 Get error message to be displayed within an AutoForm.
 
 OnDefineButtons (_.CSP.Util.FormButton pButtons)
 Subclasses can override this to redefine the buttons for a form.
 
_.CSP.Util.AutoForm ProcessSubmit (_.CSP.Request pRequest, _.Library.String pID, _.Library.String pErrorMsg)
 Takes submitted data for a form and returns an instance of AutoForm object.
 
 SetFormError (_.Library.String pMsg)
 Set a error message to be displayed within an AutoForm.
 
_.Library.Status Submit (_.CSP.Request pRequest, _.Library.String pSubmit)
 Called by the page handler when a form is submitted. More...
 

Static Public Attributes

 COMMANDFORM = None
 If true (1) then this is a specialized type of form that only. More...
 
 DOMAIN = None
 Default domain for the Portal's localization.
 
 FORMCOLUMNS = None
 Number of columns used to layout forms for this class.
 

Detailed Description

This class is used internally by InterSystems IRIS.

You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

This class provides a mechanism to automatically generate HTML forms (using CSP). Subclasses of this class can automatically generate HTML forms and tables.

Member Function Documentation

◆ CreateInstance()

_.CSP.Util.AutoForm CreateInstance ( _.Library.String  pID)
static

Create an instance of the AutoForm object using the provided ID value(s).

This is overridden by subclasses.
The default implementation will perform an OpenId if the AutoForm is a persistent object.

Reimplemented in TableForm, and QueryForm.

◆ DispatchSubmit()

_.Library.Status DispatchSubmit ( _.Library.String  pSubmit)
static

This method invokes a submit on the appropriate form class.

Do not call this method directly; use DoSubmit instead.

◆ DoSubmit()

_.Library.String DoSubmit ( )
static

Common expiration date used for cookies.

Test if an AutoForm is being submitted If so, process it and return the name of the submit button or "" if there is not a submit. For a AUTOFORM_CANCEL, return "$AUTOFORM_CANCEL" without processing...

◆ DrawHTMLForm()

_.Library.Status DrawHTMLForm ( _.Library.RegisteredObject  pObj,
_.Library.String  pID,
_.Library.String  pActionURL,
_.CSP.Util.FormButton  pButtons,
_.Library.String  pTarget 
)
static

Draw an HTML form for this form object.


pObj is an instance of the form object that provides the initial values for the form.
pActionURL is the URL to submit this form to.
pButtons is an array of submit buttons to display for the form. If not provided, the default Save and Cancel buttons are shown. pButtons is an integer-subscripted array of <class>FormButton</class> objects.

Reimplemented in AutoFormDynamic.

◆ DrawHTMLTable()

_.Library.Status DrawHTMLTable ( _.Library.RegisteredObject  pObj,
_.Library.String  pID 
)
static

Draw an HTML detail table for this form object.


pObj is an instance of the form object that provides the values for the table.

Reimplemented in AutoFormDynamic.

◆ GetComboBoxHTML()

_.Library.String GetComboBoxHTML ( _.Library.String  pValue,
_.Library.String  pName,
_.Library.String  pClass,
_.Library.String  pQuery,
_.Library.String  pCaptionColumn,
_.Library.String  pValueColumn,
_.Library.String  pP1,
_.Library.String  pP2,
_.Library.String  pP3 
)
static

Construct an HTML string defining a combo box for the given query.


pName is the name to use for the SELECT control.
pValue is the current value of the property.
Returns the HTML to display.

◆ OnSubmit()

_.Library.Status OnSubmit ( _.Library.String  pID,
_.Library.String  pSubmit 
)

This callback is called when this form is submitted.

pID is the ID value associated with the form. The default implementation will perform a Save if the AutoForm is a persistent object.
pSubmit is the name of the submit button (i.e., $AUTOFORM_SAVE).

Reimplemented in TableForm, TableForm, and QueryForm.

◆ Submit()

_.Library.Status Submit ( _.CSP.Request  pRequest,
_.Library.String  pSubmit 
)
static

Called by the page handler when a form is submitted.


pSubmit is the name of the submit button (i.e., $AUTOFORM_SAVE).

Reimplemented in AutoFormDynamic.

Member Data Documentation

◆ COMMANDFORM

COMMANDFORM = None
static

If true (1) then this is a specialized type of form that only.

displays submit buttons and no INPUT fields.