abstract class %ZEN.Component.simpleTablePane
extends component, querySource
This component draws an HTML table based on the contents
of a query. This can either be a pre-built class query or
an SQL statement.
The is a base class that provides the underlying mechanisms
used by more complex table panes.
parameter SYSMODULE = "table";
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 MODULE instead.
property enableToggleSelect
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true and multiSelect is false, then clicking on the selected row un-selects it.
property initialExecute
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true (the default) then the query associated with this tablePane
will be executed when the table is first displayed. Otherwise the
tablePane will execute the query on demand.
property multiSelect
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then the user can select multiple rows within the table.
An extra column, containing checkboxes, will be displayed to
indicate which rows are selected.
property ondblclick
as %ZEN.Datatype.eventHandler;
ondblclick event handler:
This event is fired when a row is double-clicked.
property onmouseoverClass
as %ZEN.Datatype.cssClass;
Class to be appended to the class name of the row when the user moves
his/her mouse over the row.
property onmultiselect
as %ZEN.Datatype.eventHandler;
onmultiselect event handler:
This event is fired the user changes the set of multiply-selected rows.
property onselectrow
as %ZEN.Datatype.eventHandler;
onselectrow event handler:
This event is fired when a new row is selected.
This event is passed a variable, which, which indicates
how the row was selected: "", "click" or "keypress".
property onunselectrow
as %ZEN.Datatype.eventHandler;
onunselectrow event handler:
This event is fired when the currently selected row is unselected.
property rowSelect
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, then the user can select a row within the table.
property selectedIndex
as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Index (row number) of current selected row (0 based).
property selectedRows
as %ZEN.Datatype.string(XMLPROJECTION="none");
For multi-select tables, this is the set of which rows are
selected.
The value of this property is a csv-list of values
corresponding to which row is selected.
For selected items the list contains the current user-defined logical value
for the row (as specified by the valueColumn).
For unselected items the list contains an empty string.
property showRowNumbers
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then row numbers are displayed.
property showRowSelector
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, then a column indicating the selected row is displayed.
property showZebra
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then display rows using alternating colors.
property value
as %ZEN.Datatype.string(ZENEXPRESSION=1);
Logical value of current selected row within the table.
Do not access this directly; use getProperty('value') instead.
method %DrawHTML()
Draw innerHTML for this component (without enclosing div).
method %DrawTable(pRS As %ResultSet)
as %Status
Draw the table.
method focus()
[ Language = javascript ]
Client-side method to input focus to this control.
Implemented by subclasses.
final method getValue()
as %String
[ Language = javascript ]
Client-side method to return the logical value associated with this table.
method isRowSelected(row)
[ Language = javascript ]
For multi-select table, test if a given row (0-based)
is selected.
method onmouseHandler(row, over)
[ Language = javascript ]
Handler for onmouseover and onmouseout events for a given row.
The handler only takes action if onmouseoverClass
is specified, and adds the value of this property to the current value for the
row's class.
method selectAllMultiRows(flag)
[ Language = javascript ]
For multi-select tables, mark all (visible) rows as
selected or unselected depending on the value of flag.
method selectMultiRow(row, flag)
[ Language = javascript ]
For multi-select tables, select or unselect the given row (0-based)
depending on the value of flag.
Updates the corresponding checkbox.
method selectRow(row, scroll, which)
[ Language = javascript ]
Client-side method to select the given row (0-based) in the table.
If scroll is true, scroll the new row into view.
If which is present, it is passed along to the user event notification.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
Assume that subclasses that simply wrap HTML controls
have named the control 'control' or else have overridden
this method.