Centrallix - It's Different than what you Think
Home   |   Technology   |   Screen Shots   |   Download   |   Documentation   |   History   |   For Developers

Search...


Search For:

Index...


Centrallix Documentation
1. Getting Started
2. Applications Overview
3. Application Components
4. Reports Overview
5. Report Components
6. SQL Language
7. Process Modeling
8. Application Modeling
9. Role-Based Security
10. Business Logic Modeling
11. Other Objects
12. External API's
13. Internal API's

widget/table


table :: A visual widget providing a columnar presentation of multiple objects of the same type (such as query result records).

Metadata:
type:widget/table
visual: yes
container: no
form element: no


Overview:

A table widget is used to display data in a tabular format. It consists of a header row with column labels, followed by any number of rows containing data.The header may have a different color or image scheme than the rows, and the rows may or may not be configured to alternate between two colors or background images.

Table widgets come in three different flavors: static, dynamicpage, and dynamicrow.Static table widgets are built on the server and write their data directly into the container in which they reside, which is usually a scrollpane widget. Dynamicpage table widgets load their data once they initialize on the client, by activating a query through an ObjectSource nonvisual widget.Dynamicpage table widgets do not support modification, but can be reloaded through an ObjectSource at will.Dynamicrow table widgets, on the other hand, display each row as an individual layer, and thus are modifiable on the client. Dynamicrow table widgets also load their contents through an ObjectSource widget query.As of the time of writing of this document, only static mode and dynamicrow mode were supported.
Table widgets allow the selection (keyboard, mouse, and data focus) of individual rows.


Usage:

Table widgets are normally placed inside of a scrollpane so that any rows which don't fit int the container can still be viewed. Table columns are created via "widget/table-column" child widgets within the table widget.


Properties:

PropertyTypeDescription
allow_selection yes/no Whether to permit the user to select rows in the table. Default "yes".
background string A background image for the table. This "shows through" between table cells.
bgcolor string A color, RGB or named, to be used between table cells and rows.If neither bgcolor nor background are specified, the table is transparent.
cellhspacing integer The horizontal spacing between cells in the table, in pixels. Default is 1.
cellvspacing integer The vertical spacing between cells in the table, in pixels. Default is 1.
colsep integer The width of the column separation lines in pixels. Default is 1.
data_mode string Either "rows" (default) or "properties". In "properties" mode, the table displays one row per attribute, and so only displays the current record in the objectsource. In "rows" mode, the table displays one row per record in the objectsource.
dragcols integer Whether to allow dragging of column boundaries to resize columns; set to 1 to allow it and 0 to disallow. Default is 1.
followcurrent yes/no Set to 'yes' to cause the table's current row to follow the currently selected object in the ObjectSource, and 'no' to disable this behavior. Default is 'yes'.
gridinemptyrows integer Whether to show the table's grid in rows which do not hold data. Set to 1 to show the grid or 0 to not show it; default is 1.
hdr_background string A background image for the header row cells.
hdr_bgcolor string A color, RGB or named, for the header row cells.
rowhighlight_background string A background image for the current (selected) row cells.
rowhighlight_bgcolor string A color, RGB or named, for the current (selected) row cells.
newrow_background string A background image for the "new row" placeholder that is visible when a new object is being created.
newrow_bgcolor string A color, RGB or named, for the "new row" placeholder that is visible when a new object is being created.
inner_border integer width of the inner spacing between cells in a table. Default0.
inner_padding integer margins within each cell, in pixels. Default is 0 pixels.
mode string The mode of operation of the table, either "static" to be generated on the server when the application is generated, "dynamicpage" to be generated on the client a page at a time, or "dynamicrow", to be generated on the client a row at a time. Default is "static".
outer_border integer width of the outer spacing around the outside of the table, in pixels. Default0.
row1_background string A background image for the table row cells.
row1_bgcolor string A color, RGB or named, for the table row cells.
row2_background string A background image for the table row cells. If this is specified, rows will alternate in backgrounds between "row_background1" and "row_background2".
row2_bgcolor string A color, RGB or named, for the table row cells. If this is specified, rows will alternate in colors between "row_bgcolor1" and "row_bgcolor2".
rowheight integer The height of the individual rows in pixels. Default is 15 pixels.
show_selection yes/no Whether to highlight the currently selected row. Default "yes".
sql string The SQL query to be used for obtaining the data for the table.This query's result set child widgets.
textcolor string A color, RGB or named, of the text in the normal data rows.
textcolornew string A color, RGB or named, of the text in the "new row" placeholder.
textcolorhighlight string A color, RGB or named, of the text in the highlighted data row.
titlebar yes/no Whether to show the title bar of the table. Default "yes".
titlecolor string A color, RGB or named, of the text in the header row. If unset, defaults to textcolor.
width integer width, in pixels, of the table.The height is determined dynamically.
windowsize integer The maximum number of rows to show at any given time, for dynamic tables.
x integer x-coordinate of the upper left corner of the table. Default is 0.
y integer y-coordinate of the upper left corner of the table. Default is 0.


Child Properties:

(of widget/table-column child widgets)

PropertyTypeDescription
title string The title of the column to be displayed in the header row.
width integer width of the column.
align string The alignment of the column: "left" or "right".
type string The type of the column: "text", "check", or "image". "text" is a normal column, and displays the textual value of the data element. "check" displays a checkmark if the data is non-zero (integers) or for strings if the value is non-empty and not "N" or "No". "image" displays the image referred to by the pathname contained in the data value.


Actions:

none currently available

Events:

EventDescription
Click The Click event fires when a user clicks on a row.
DblClick The DblClick event fires when the user double-clicks the mouse on a row. Passes three values, 'Caller' which is the table's name, 'recnum' which is the sequential number of the record in the table, and 'data' which is an array of the data in the selected record.


Sample Code:

$Version=2$
// Here is a simple static table.
tblFileList "widget/table"
	{
	sql = "select :name,annotation=condition(:annotation=='','-none-',:annotation)
				from /samples";
	mode="static";
	width=408;
	inner_border=2;
	inner_padding=1;
	bgcolor="#c0c0c0";
	row_bgcolor1="#e0e0e0";
	hdr_bgcolor="white";
	textcolor="black";
	name "widget/table-column" { title="Object Name";width=20; }
	annotation "widget/table-column" { title="Annotation"; width=25; }
	}




Comments...


(none yet)

Add a Comment...


Your Name:
Comment:


(c) 2001-2020 LightSys Technology Services, Inc. All trademarks are property of their respective owners.

Project Hosting Provided By:
Hosted by Sourceforge