|
Bindings |
Top Previous Next |
|
The Data Table Format may also define one or more bindings. Data Table bindings are similar to formulas in electronic spreadsheets (like Microsoft Excel). They define relationships between cells in the table. If the value of an "input" cell changes, the values in other cells that are bound to it are recalculated. A data binding points to an output cell in the data table (i.e, the "left" part of the binding expression, or "binding target"), and derives its value from an input expression (which can contain references to one or more data sources or table cells). When such a data source (used as an input for the binding expression) changes, the binding is automatically re-evaluated, and a new value is posted to the output cell. Binding Target variable$field[row]#property All elements of the binding target are optional, except for field. It indicates the field in the table to which changes should be applied. If a variable is specified, we've just created a cross-table binding. This is a binding in which values stored in one Data Table are copied into another Data Table. Such a binding will work only if the values of both variables are being edited within a single Edit Properties UI Procedure. If row is not specified, the binding will be applied to every row in the table. If property is not specified, the evaluation result is written to field. Properties are used to modify the behaviour of a given field when it's being edited. You can use them to conditionally enabled/disable the field, or to make a field into a drop-down list. Supported properties:
Binding Expression The binding expression may contain only standard references. If a reference points to a cell within the table being edited, it will resolve to the value currently contained in the cell (which may be edited by a user, or written by other binding). In all other cases value will be retrieved from the server context, as described in standard references section. Example recipient#enabled = {mailSendingEnabled} When this binding is processed, editing of the recipient field (probably, e-mail recipient) is enabled for a user only if the Boolean field "mailSendingEnabled" contains a TRUE value (i.e. mail sending is enabled). If a Data Table has several records, this binding will apply to every record separately. |