This component draws an HTML table based on the contents
of a query.
The data for the table can come from a pre-built class query, an SQL statement, or the tablePane can create an SQL query automatically.
The properties of the
Many of the characteristics of the tablePane are inherited from its superclass,
If set, this indicates that this system component should be placed in the given "module". A module is a grouping of components within the same class package that share common include (js or css) files. Note that certain root classes are implicitly placed within the "core" module.
Classes outside of the Zen library should not set this, they should use the
If true (the default), automatically re-execute the query for this table when the user changes the value of a column filter.
If false, the query will only be re-executed when the
If present, this specifies the height of the body section of the table.
Caption displayed for this table using the HTML caption element.
This is a localized value.
Amount of spacing around cells in the table. The default is 0 (no extra space around table cells). For a slight but noticeable separation, a useful value is 2.
Client-side, run-time flag that is set when client wants to force re-execution of the table query when the table is in "snapshot" mode.
List of column information objects.
Each object specifies additional details about a column in the table.
A list of conditions. These are special expression objects that are evaluated to add data-dependent styles to the table.
This is the logical name of the most recently selected column header. Typically this is used for sorting.
For snapshot mode, this is the number (1-based) of the current "page" within the snapshot that is displayed.
Specifies where the data columns of the table come from.
"query" (the default)- columns are displayed for each column in the data source query.
"columns" - only columns explicitly defined in the
columnslist are displayed.
Width used for extra columns, such as row number, row selector, etc.
If true, disable column filters (if any).
If true, then the header of the table will stay in position when the body of the table is scrolled.
This property controls how to display the table header when column filters are used.
- "filtersOnTop" - (the default) Display column filters above column headers.
- "headersOnTop" - Display column headers above filters.
Localized "invalid date" message displayed by control.
Time, in ODBC timestamp format, that the query for this table was last executed. This is set on the server whenever the query is for the tablePane is executed.
IE does not support CSS nowrap correctly so this flag provides a way to control whether table cells allow word wrapping or not.
onheaderClick event handler: This event is fired when the user clicks on a column header. The name of the column will be in the
onkeypress event handler: If
useKeysis true, then this event handler code is run when the user presses a key within the tablePane.
This is the number of items to display on a single "page" of the table. 0, the default, means show all data on first page. This can only be set to a non-zero value when the table is in snapshot mode.
User-defined list of parameters. These values are passed on to the user callback function that provides the query for this table.
Flag for backwards compatibility. If
This property should be set to 1 by server-side methods that want to force the query associate with the tablePane to be re-executed.
If present, this is the number of rows returned by the current query. This is calculated by the built-in query or the automatic query.
Note: this is a string as it could be set to "" or "100+".
If true, display column filters (if any).
Server-side diagnostic flag. If true, display the query used to get data for this table.
This is an encrypted value and cannot be set on the client.
If true, then the tooltip (HTML title attribute) displayed for cells within the table will display the current value of the cell.
For sortable tables, this is the order to sort values within the current column. Values can be "", "asc" (ascending), or "desc" (descending).
Flag for less intrusive remedial action when Client-side SQL modification is forbidden. If
permitClientSQLis set to false (the default), this flag controls the rendering of the table if client side modification of the query parameters is detected. By default, a Zen Exception will be raised, warning of the security risk. If this flag is set to true, however, the exception will be suppressed and the table will re-render using the last known (server-side) values for the query parameters. In this case the client-side modifications are simply ignored. The default value is "false" indicating that the exception should be raised.
Flag to control whether session is unlocked during updates to the table.
If true, then the tablePane will capture user keystrokes and use them for simple table navigation.
If true, create a temporary snapshot of the query results. This allows for paging and sorting without re-executing the query.
If defined, this is the name of the data column that provides a logical value for a selected row.
Add a new column definition to this tablePane. If pColumn is not provided, this method will create a new column object.
Add a new parameter definition to this tablePane. If pParm is not provided, this method will create a new parameter object.
Create a temporary snapshot file from a result set. Assumes that result set has been created and executed. Users should not call this method.
Invoke user method to provide contents for a cell
Invoke user method to provide contents for a column filter.
Draw innerHTML for this component (without enclosing div).
Draw the table.
Tests if a column type is a numeric type. Zen uses the CLIENTDATATYPE value, not ODBCTYPE. Client types are defined as: Returns the type of column n in the result set where type is an integer associated with the client datatype. If the type cannot be determined, 0 (zero) is returned.
1 BINARY 2 DATE 3 DOUBLE 4 HANDLE 5 INTEGER 6 LIST 7 LONGVARCHAR 8 TIME 9 TIMESTAMP 10 VARCHAR 11 STATUS 12 BINARYSTREAM 13 CHARACTERSTREAM 14 NUMERIC 15 CURRENCY 16 BOOLEAN 17 OID 18 BIGINT 19 FDATE 20 FTIMESTAMP
If implemented, this callback method is called at page render-time after this component has been added to a page and after any of its children have been created but before the %DrawHTML methods are called.
This callback is invoked by the %ZENDeserialize method.
Fetch data from snapshot global and package up as a client object. pIndex is index of client component.
pID is internal ID of snapshot global.
pRow is row number to fetch.
Associate a navigator component with this tablePane. This is called by the navigator component.
Appends new column object to this table with the given column name. Returns the new column object.
executeQuerymethod after calling this to update the table.
If we are in autoExecute mode, then re-execute the query for this table using the current value of any column filters. If we are not in autoExecute mode, then do nothing.
Disable (or enable) the column filters for this table.
Force query for this table to be executed on the server. If the table is in snapshot mode, then a new snapshot will be created.
If remember is true, then the table will stay on the same page after the new results are displayed. If sync is defined and is true, the refresh will be executed synchronously (unless we are in deferred mode).
User has changed the value of a filter. filterName is the name of the filter.
refresh indicates if the query should be re-executed.
type (optional) is type of filter.
index (optional) is control index for filters with multiple controls.
User has pressed a key within a filter.
For multi-page display, go to the first page.
Client-side method to input focus to this control.
Get column filters (if there are any). Returns an associative array containing the current values of the filter controls indexed by column name.
Get current value of column filter associated with column cname.
For multi-page display, calculate the number of pages.
Explore the DOM and extract the data for the specified phyiscal table row (0-based) from the rendered table data (not to be confused with the logical row number of the data itself in a multi-page table).
This is a client-side only call and can query only the values of the current page of the current table. The full, logical contents of the table (in snapshot mode) resides at the server and logical rows may be accessed using getRowData()
If there are not data columns to report or if the requested row is greater than the page size for the table, this function returns null.
For tables in snapshot mode only.
For non-snapshot tables or out of range row numbers, returns null.
For multi-page display, go to specified page (1 is first page), if possible.
User has clicked on a column header.
For multi-page display, go to the last page.
For multi-page display, go to next page, if possible.
This client event, if present, is fired when a popup page has specified this component as its parent and fires an action.
popupName is the name of the popup window sending the action.
action is the name of the action.
value is the value associated with the action.
When the page is loaded, check for alignment issues between the table header and the table body.
For multi-page display, go to previous page, if possible. If giveFocus is true, then give focus back to the hidden control.
Remove the navigator component with this tablePane. This is called by the navigator component.
Reset the values of the column filters (if there are any).
Under IE with fixedHeaders set to true, the table headers and the body columns may become misaligned. This routine checks for alignment issues in the rendered table and, if needed, reformats the header to accound for the space taken up by a vertical scrollbar in the body of the table.
Set the value of all column filters (if there are any). state is an associative array containing the current values of the filter controls indexed by column name (as returned by
Set value of date filter box. index is 0 or 1 to indicate which date box to set.
Set the value of column filter associated with column cname.
Set the value of a named property.
Show or hide columns filters (if there are any). Users should use setProperty('showFilters',true) instead.
Display date selector for a date filter box.
Process key down event within the table's invisible edit control.
Process key press event within the table's invisible edit control.