company logo

3. Datasource - Control data source

Most controls do have one (main) data source. The data source might be a collection of object instances, a single instance, but also an elementary value. The data source represents the data binding to database or transient data items.

The binding between data source and control in odabagui is be-directional, i.e. changing the value or selection in a control will change the data source automatically, but also changing the value or selection in the data source becomes immediately visible at the user interface.

Depending on the data source type, data sources can be accessed via odaba:: Property or odaba:: Value . In order to access collections, property() has to be used. property() might also be used in order to access instances or values, but the value handle provides more specific functionality for accessing and manipulating elementary values.

In order to access values, Value(property()) might be called, when an instance has been selected in the data source or when the data source is transient.

Besides the main data source for a control, other control data sources might be provided as base collection assigned to the control or the new instance. Properties for complex controls (trees or tables) can be provided for each Line or Cell .

Functions