Data Aware Controls
The second part of the Data Awareness capabilities of Apache OpenOffice are data aware controls. While a form is always associated with a complete result set, it represents this result set, a single control is bound to one data column that is part of the form which is the control's parent.
As always, the relevant information is stored in the control model. The basic service for control models which are data-aware is com.sun.star.form.DataAwareControlModel.
There are two connections between a control model and the column it is bound to:
- This is the property that determines the name of the field to bind to. Upon loading the form, a control model searches the data columns of the form for this name, and connects to it. An explanation for "connects" is provided below.
- Note that this property is a suggestion only. It tells the control model to connect to the data column, but this connection may fail for various reasons, for example, no such column may exist in the row set.
- Even if this property is set to a non-empty string, this does not mean anything about the control being connected.
- Once a control model has connected itself to a data column, the respective column object is also remembered. This saves clients of a control model the effort to examine and handle the DataField, they simply rely on BoundField.
- Opposite to the DataField property, BoundField is reliable in that it is a valid column object if and only if the control is properly connected.
The overall relationship for data awareness is as follows:
|Content on this page is licensed under the Public Documentation License (PDL).|