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

Directory Form Reference

Design-Time Properties

Property Description
Name A unique name for the directory form.
Connection The database connection used by the form.
Data Source Type The type of database resource that provides the data for the form.
Data Source The table, SQL query or stored procedure that provides the data for the form.
Category ID Field The database field which contains the IDs of the categories displayed in the Path
Subcategory ID Field The database field which contains the ID of the subcategories. This is essentially the same as the Category ID field but the field comes from an alias table.
No. of Columns The directory form displays categories in columns. Use this property to set the number of columns to be used.
No. of Subcategories Each category in the directory form can have a number of subcategories. This property limits the number of subcategories that could be displayed. A link is provided to access extra columns if they are more than the limit.
Restricted Specifies whether a user has to be authenticated in order to view the form.

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 Occurs before the form is displayed and after the data for the form has been retrieved from the database and saved to control variables. This event can be used to populate custom template variables defined within directory HTML block.
Before Show Category Occurs before each category in the form is shown. This event can be used to alter category values or performing other operations using the values of the categories.
Before Show Subcategory Occurs before each subcategory in the form is shown. This event can be used to alter subcategory values or performing other operations using the values of the subcategories.
Before Build Select This event occurs before the query that will be used to retrieve records from the database is put together. This event can be used to modify the different clauses that make up the query such as the WHERE clause or the ORDER BY clause.
Before Execute Select This event occurs immediately before a row selection query is executed but after the query has been composed. This event can be used to modify the entire query before it is executed.
After Execute Select This event occurs after the row selection query has been executed and a recordset containing the results is returned.

Run-Time Properties (ASP)

Property Description
DataSource  This property stores a reference to the data source bound to the specified object. The data source handles all data retrieval operations. It serves as an abstraction layer that hides underlying data source details, whether it is a database table, SQL query or stored procedure.
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. 
NumberOfColumns  Number of columns over which the categories in the directory form are spread.
NumberOfSubCategories  Maximum number of subcategories to display per category.
Recordset  This property contains the form’s recordset which contains the data used to populate the form.  
Visible  This property determines whether the form will 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 control . 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 control. 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 control.

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.
NumberOfColumns  Number of columns over which the categories in the directory form are spread.
DataSource  This property stores a reference to data source bound to the form. 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.
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. 
NumberOfSubcategories  Maximum number of subcategories to display per category.
Visible  This property determines whether the component will 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 control . 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 control. 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 control.

Run-Time Properties (.NET)

Interface
Property Description
DataSource  This property stores a reference to data source bound to the form.
NumberOfColumns  Number of columns over which the categories in the directory form are spread.
NumberOfSubCategories  Maximum number of subcategories to display per category.
Visible  This property determines whether the component will be shown or not. 
Model Layer
Property Description
errors  This property keeps a reference to the object’s errors collection. It is used to collect error messages generated during the object’s execution. 
<control name>  For each control that is located within a form, a member property is created with the same name as the control.  
Directory 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 parameter source type) and parameter name (according to parameter source).

Methods (.NET)

Interface

Method Description
DataBind  Binds a data source to the invoked server control and all its child controls.

Data Provider

Method Description
GetResultSet  Executes an SQL command and returns results in an Items array.

Run-Time Variables (CF,CFT)

Variable Description
NumberOfColumns  Number of columns over which the categories in the directory form are spread.
hide<control name> This variable determines whether the control is to be shown or not.
NumberOfSubCategories  Maximum number of subcategories to display per category.
strOrder  This property contains the ORDER BY clause portion of the SQL query used to retrieve records for the control. The ORDER BY clause determines the order of appearance of the retrieved records.
strSQL  This property contains the main portion of the SQL query used to retrieve the records displayed within the control . In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
strWhere  This property contains the WHERE clause portion of the SQL query used to retrieve records for the control. The WHERE clause provides the criteria which filters the records retrieved.
query<control name>  This variable contains the query object associated with the control.

Methods (Servlets & JSP)

MethodDescription
getCurrentCategoryId Get the category ID of the currently selected category.
getNumberOfRows Get the total number of records at the current directory level.
isEmpty Returns a value indicating whether the categories list is empty.
getNumberOfCategories Get the number of categories.
getNumberOfSubCategories Get the number of subcategories shown for each category.
setNumberOfSubCategories Specify the number of subcategories to be shown for each category.
getCurrentCategoryNumber Get the order number of the current category.
getCurrentSubCategoryNumber Get the order number of the current subcategory.
getNumberOfColumns Get the number of columns which should be shown in the Directory form.
setNumberOfColumns Set the number of columns which should be shown in the Directory form.
getCategoryNumberInColumn
isRestricted Returns a value indicating whether users must be logged in before accessing the form.
setRestricted Specify whether users must be logged in before accessing the form.
getPageModel Page to which the component belongs.
isProcessed Indicates whether a component has been processed (the ccsForm parameter is equivalent to the name of the component).
hasNextRow Returns true if there are more elements in a collection.
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.
getParent Get the parent component that contains the form.

See also

Directory Form Overview


On-line, printable versions and updates