Simple data binding refers to the relationship between a field in a recordset and the property of a WFC component. When a property is bound, data is automatically transferred between the field and the property:
Note If an attempt is made to update a read-only recordset, the recordset will generate an ADO exception. You can then catch this exception and set the bound property back to its previous value; otherwise, the value of the property and the value of the field will be inconsistent.
Simple data binding in WFC is performed by the DataBinder component. This component creates and manages the binding between the field and the property. The DataBinder component can bind any property that is accessible through methods matching the following design patterns:
public <PropertyType> get<PropertyName>()
public void set<PropertyName>(<PropertyType>)
If a property is marked with the NotBindable attribute, then it is not enumerated in the DataBinder componentÆs design page and cannot be bound within the Designer; however, you can still bind the property programmatically. The NotBindable attribute is specified in the componentÆs ClassInfo. Typically, the name property is marked as NotBindable.
Note The DataBinder component does not support indexed properties. The DataBinder component will not enumerate indexed properties in its design page, and will generate a Java exception if you attempt to bind an indexed property programmatically.
The component of a bound property can provide events that signal when a property is about to be changed (a request) and when the property has been changed (a notification):
Note By default, no data validation is performed before the recordset is updated. However, you can use the Changing events on the recordset to validate the new property value.