CodeCharge Studio All ASP PHP Perl ColdFusion Java C#.NET VB.NET

Record Form Reference

Design-Time Properties

Property Description
Name The name of the form.
Connection The database connection from which information will be retrieved.
Data Source Type The type of data source or the method used to retrieve the data.
Data Source The database column, SQL Query or other expression from where the data will be retrieved.
Return Page The page to which the user is directed to after the form has been submitted successfully.
Remove Parameters Specify a semicolon-separated list of parameters that should be removed from the hyperlink.
Convert URL To Specify whether URLs should be automatically converted to absolute URLs or secure URLs for the SSL protocol (https://).
Restricted Specify whether users must be logged in before accessing the form.
Allow Insert Specify whether the form can be used to insert new data.
Allow Update Specify whether the form can be used to update existing data.
Allow Delete Specify whether the form can be used to delete existing data.
Preserve Parameters Specify whether Get or Post parameters should be preserved.
Custom Insert Type If you wish to override the default insert mechanism, select the type of method to be used to perform the insert operation.
Custom Insert Specify the procedure to be used to insert data.
Custom Update Type If you wish to override the default update mechanism, select the type of method to be used to perform the update operation.
Custom Update Specify the procedure to be used to update data.
Custom Delete Type If you wish to override the default delete mechanism, select the type of method to be used to perform the delete operation.
Custom Delete Specify the procedure to be used to delete data.

Events

Event Description

Server Side Events

Before Select This event occurs at the onset of the operations performed to select records from the database.
Before Show This event occurs before a component is rendered to the page.
Before Build Select This event occurs before the creation of the query that will be used to retrieve records from the database.
Before Execute Select This event occurs immediately before a row selection query is executed but after the query has been composed.
After Execute Select This event occurs after the row selection query has been executed and a recordset for the result is returned.
On Validate This event occurs after standard validation operations have been performed as a result of submitting values, but before any database operations have been performed with the submitted values.
Before Insert This event occurs at the onset of the operations performed to insert a new record into the database.
Before Build Insert This event occurs before the creation of the query that will be used to insert a new record into the database.
Before Execute Insert Occurs directly before executing new row insertion query, after all its components have been prepared.
After Execute Insert This event occurs after new row insert query has been executed.
After Insert This event occurs after inserting a new row into data source, but before error processing.
Before Update This event occurs before preparing to update an existing record.
Before Build Update This event occurs before the creation of the query that will be used to update database content.
Before Execute Update This event occurs immediately before a row update query is executed but after the query has been composed.
After Execute Update This event occurs after a row update query has been executed.
After Update This event occurs after updating an existing row in the data source, but before error processing.
Before Delete This event occurs before preparing for a row deletion.
Before Build Delete This event occurs before the creation of the query that will be used to deleted a database record.
Before Execute Delete This event occurs immediately before a row deletion query is executed but after the query has been composed.
After Execute Delete This event occurs after a row deletion query has been executed.
After Delete This event occurs after deleting a row from the data source, but before error processing.

Client Side Events

On Load Used for binding Validation rules to control.
On Submit Occurs on the client side when the user submits the form, before the data are sent to the server from the form.

Run-Time Properties (ASP)

Property Description
DataSource  This property stores a reference to the data source bound to the form. The data source handles all data retrieval and update operations. It serves as an abstraction layer that hides underlying data source details, whether it is a database table, SQL query or stored procedure.
DeleteAllowed  This property determines whether the delete operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Delete event.
EditMode  This property specifies the mode in which a form currently is in. A form can either be in Insert mode or Edit mode.
Errors  This property keeps a reference to the form's error collection. It is used to collect error messages generated during the form’s execution. 
FormSubmitted  This property determines how a form is processed based on whether the form is being shown for the first time or has been submitted for postback. In the initial display, the form fields are assigned data values before being displayed. Otherwise if the form has been submitted for postback, the submitted data is processed based on the operation that was initiated upon submission.
InsertAllowed  This property determines whether the insert operation can proceed or not.
PressedButton  This property contains the name of the form submit button which was clicked to initiate postback.
ReadAllowed  This property determines whether the data read operation can proceed or not.
Recordset  This property contains a recordset in which is the database record that will be shown in the form.  
UpdateAllowed  This is a boolean property whose value determines whether the update operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Update event.
Visible  This property determines whether the form is to be shown or not. 

Data Source properties

Property Description
DataSource.SQL  This property contains the main portion of the SQL query used to retrieve the records displayed within the form. In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
DataSource.Where  This property contains the WHERE clause portion of the SQL query used to retrieve records for the form. The WHERE clause provides the criteria which filters the records retrieved. The value of this property is appended to the value of the DataSource.SQL property to create the final SQL query which is executed against the datasource to retrieve the records for the form.
DataSource.CmdExecution This property determines whether or not the Insert, Update or Delete operation should proceed depending on the used BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete event.

Run-Time Properties (PHP)

Property Description
ComponentType Specifies type of an object, such as "TextBox", "Record", etc.
Parent Specifies parent container of an object, for example a record form for a textbox that is included within that form.
DataSource  This property stores a reference to the data source bound to the form. The data source handles all data retrieval and update operations. It serves as an abstraction layer that hides underlying data source details, whether it is a database table, SQL query or stored procedure.
DeleteAllowed  This property determines whether the delete operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Delete event.
EditMode  This property specifies the mode in which a form currently is in. A form can either be in Insert mode or Edit mode.
Errors  This property keeps a reference to the form's error collection. It is used to collect error messages generated during the form’s execution. 
FormSubmitted  This property determines how a form is processed based on whether the form is being shown for the first time or has been submitted for postback. In the initial display, the form fields are assigned data values before being displayed. Otherwise if the form has been submitted for postback, the submitted data is processed based on the operation that was initiated upon submission.
InsertAllowed  This property determines whether the insert operation can proceed or not.
PressedButton  This property contains the name of the form submit button which was clicked to initiate postback.
ReadAllowed  This property determines whether the data read operation can proceed or not.
UpdateAllowed  This is a boolean property whose value determines whether the update operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Update event.
Visible  This property determines whether the form is to be shown or not. 

Data Source properties

Property Description
DataSource->SQL  This property contains the main portion of the SQL query used to retrieve the records displayed within the form. In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
DataSource->Where  This property contains the WHERE clause portion of the SQL query used to retrieve records for the form. The WHERE clause provides the criteria which filters the records retrieved. The value of this property is appended to the value of the DataSource->SQL property to create the final SQL query which is executed against the datasource to retrieve the records for the form.
DataSource->CmdExecution This property determines whether or not the Insert, Update or Delete operation should proceed depending on the used BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete event.

Run-Time Variables (CF,CFT)

Property Description
blnDeleteAllowed<control name>   This variable determines whether the delete operation should proceed or not. The value of this variable is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Delete event.
blnEditMode<control name>  This variable specifies the mode in which a form currently is in. A form can either be in Insert mode or Edit mode.
blnFormSubmitted<control_name>  This variable determines how a form is processed based on whether the form is being shown for the first time or has been submitted for postback. In the initial display, the form fields are assigned data values before being displayed. Otherwise if the form has been submitted for postback, the submitted data is processed based on the operation that was initiated upon submission.
blnInsertAllowed<control name>  This variable determines whether the insert operation can proceed or not.
blnReadAllowed<control name>   This variable determines whether data read operation can proceed or not.
blnUpdateAllowed<control name>  This is a boolean variable whose value determines whether the update operation should proceed or not. The value of this variable is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Update event.
hide<control name>  This variable determines whether the control is to be shown or not.
strError<control name> This variable contains any error messages generated during execution of the form.
strOperation  This variable indicates the operation to be performed based on the value of the submit button that was clicked to initiate postback.
strPressedButton  This variable contains the name of the form submit button which was clicked to initiate postback.  
strSQL  This variable contains the main portion of the SQL query used to retrieve the records displayed within the form. In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
strOrder<control name>  This variable contains the ORDER BY clause to be used in the SQL query executed for a query object (cfquery tag).
strSQL<control name>  This variable contains the SELECT and FROM clauses of the SQL query to be used for a query object (cfquery tag).
strWhere<control name>  This variable contains the WHERE clause of the SQL query to be used for a query object (cfquery tag).
query<control name>  This variable contains the query object associated with the form. 
endOperation<control name> This property determines whether or not the Insert, Update or Delete operation should proceed depending on the used BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete event.

Methods (Servlets & JSP)

Method Description
isEditMode Returns a value indicating whether Record form is in Edit mode.
isAllowRead Returns a value indicating whether the data read operation can proceed or not.
setAllowRead Use to toggle the value which determines whether the data read operations can proceed or not.
isAllowInsert Returns a value indicating whether the insert operation can proceed or not.
setAllowInsert Use to toggle the value which determines whether the insert operation can proceed or not.
isAllowUpdate Returns a value indicating whether the update operation should proceed or not.
setAllowUpdate Used to toggle the value which determines whether the update operation should proceed or not.
isAllowDelete Returns a value indicating whether the delete operation should proceed or not.
setAllowDelete Used to toggle the value which determines whether the delete operation should proceed or not.
setRestricted Specify whether users must be logged in before accessing the form.
getPageModel Get the page to which the component belongs
hasNextRow Returns true if there are more elements in a collection
nextRow Returns the next row. If the next row isn't available, this method returns an empty HashMap; This method never returns a null.
currentRow Returns the current row.
getChild Specify a name to find a child control among the collection of children controls.
getChildren Return all children controls of a collection.
getControl Specify a name to find a Control among the collection of controls.
getFileUpload Specify a name to find a FileUpload control among the collection of children controls.
getButton Specify a name to find a Button control among the collection of children controls.
getListBox Specify a name to find a Listbox control among the collection of children controls.
getRadioButton Specify a name to find a Radiobutton control among the collection of children controls.
getCheckBoxList Specify a name to find a Checkbox List control among the collection of children controls.
getLink Specify a name to find a Link control among the collection of children controls.
getDatePicker Specify a name to find a Date Picker control among the collection of children controls.
isVisible Returns a value indicating whether this control should be displayed or not.
setVisible Specify whether the form should be shown or not.
isCmdExecution Returns a value indicating whether the operation should proceed or not.
setCmdExecution Specify whether the operation should be performed or not.
getParent Get the parent component that contains the form.

Run-Time Properties (.NET)

Record Interface objects

Property Description
<form name><control name> For each control that is located within the form, a protected member property is created with corresponding name.
System.Collections.Specialized.NameValueCollection <control name>Errors The collection of global critical errors, such as DataProvider errors. See the .NET Framework SDK reference.
<control name>DataProvider <control name>Data The Data Source Provider for the Record form.
System.Web.UI.WebControls.PlaceHolder <control name>Holder PlaceHolder object which holds all Record controls. Refer to .NET Framework SDK reference for more information.

Record Model Layer

Property Description
errors  This property keeps a reference to the form’s errors NameValueCollection. It is used to collect error messages generated during the object’s execution.
<control name>  For each control that is located within the form, a member property is created with the same name as the control.
IsNew  This property indicates if an item created based on an insert row.
IsDeleted  This property indicates if a record has been submitted for deletion.


Record Data Provider

Property Description
<prefix><parameter name>  For each unique parameter of the Data Source command, a member property is created with the prefix (according to the parameter source type) and parameter name (according to the parameter source).
CmdExecution This property altered in BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete events determines whether the Insert, Update or Delete operation (respectively) for the current row should proceed.

Methods (.NET)

Record Model Layer

Method Description
CreateFromHttpRequest  Returns an instance of an item whereby the values are initialized from Http request values.
Validate  Performs the item validation and returns true if validation is successful, otherwise false.

Record Data Provider

Method Description
InsertItem  Performs the insert operation for each item in the items array.
UpdateItem  Performs the update operation for each item in the items array.
DeleteItem  Performs the update operation for each item in the items array.
FillItem  Execute a query against the database and return the results in an items array.

See also

Record Form Overview


On-line, printable versions and updates