skip to main content
OpenEdge Development: AppBuilder
Data-Display/Capture Objects : SmartDataFields
 
SmartDataFields
A simple fill-in is not necessarily the best representation for all data fields. Sometimes it would be very convenient to bring the power of ADM Smart technology down to the level of the individual data field in a SmartDataViewer. AppBuilder offers the SmartDataField object as a way for you to do that.
The SmartDataField instances you use in your applications are each based on a master object that you design for a particular purpose. Once you design a SmartDataField master, you can reuse it repeatedly whenever you need a SmartDataViewer field with that particular capability.
AppBuilder supports SmartDataFields only as replacement for simple SmartDataViewer fields, not for standalone placement. You can extend their applicability, if you wish, by writing the necessary supporting code.
For information about creating SmartDataField masters, see OpenEdge Development: ADM and SmartObjects.
Placing and configuring a SmartDataField instance
Each field in a SmartDataViewer represents a certain data type—an INTEGER, for example, or a DATE. The SmartDataField object you use as a replacement for such a field must represent the same type.
To use a SmartDataField in a SmartDataViewer:
1. Choose FileOpen and select the SmartDataViewer master you intend to modify. Click OK. The master opens in a workspace window, as shown:
2. Click on the SmartDataField in the Object Palette.
3. When the Choose dialog box appears, select the appropriate master and click OK.
4. Position your mouse cursor over the field you are replacing, and click to make the replacement. The SmartDataField representation appears in place of the original fill-in:
5. Add a static text label, if appropriate. A SmartDataField does not inherit the label of the field it replaces.
6. AppBuilder supplies stubs for the enableField() and disableField() procedures. Open the Section Editor and add additional code to make those procedures work for the particular SmartDataField you added.