skip to main content
OpenEdge Development: ADM and SmartObjects
SmartObjects : SmartDataViewers
A SmartDataViewer is an ADM viewer‑class SmartObject that displays database fields in a frame. A SmartDataViewer uses a SmartDataObject as a data source. A SmartDataViewer can be a type of SmartContainer; however, because it is a highly specialized SmartContainer, it is described separately in this section. For a general description of SmartContainers, see the “SmartContainers” section.
In addition to displaying database fields in a frame, a SmartDataViewer coordinates its display of records with other SmartObjects, typically SmartDataBrowsers and SmartDataObjects. SmartDataViewers can also coordinate with SmartPanels to modify records. SmartDataViewers typically use SmartDataObjects as data sources. For more information, see Chapter 4, “Data Management in the ADM.”
A SmartDataViewer is intended to contain only basic objects, SmartDataObjects that will be used with SmartSelects, and/or SmartDataFields. (See the “SmartSelects” section and the “SmartDataFields” section.) You typically use contained SmartDataFields to provide specially formatted displays of data in selected fields in the SmartDataViewer. For example, you might develop a SmartDataField that appears as a calendar and use it in a SmartDataViewer to display a date field.
Table 2–7 lists the SmartDataViewer files.
Table 2–7: SmartDataViewer files 
File type
Filename / SmartLinks
Template file
(standard SmartDataViewer template with wizard)
Primary include file
ADM/Progress Advisor‑ supported SmartLinks
Properties dialog box
src/adm2/support/visuald.w (source code)
gui/adm2/support/visuald.r (compiled code)
SmartDataViewer instance properties
The SmartDataViewer uses the Visual SmartObject Properties dialog box, shown in Figure 2–5.
Figure 2–5: SmartDataViewer instance properties dialog box
You use the instance properties in this dialog box as follows:
*Enable — If checked (the default), this enables the dynamic SmartDataViewer for use
*View — If checked (the default), this makes the dynamic SmartDataViewer visible
*Layout — This property is disabled for SmartDataViewers when an alternate layout has been defined in the SmartDataViewer master
SmartDataViewer usage notes
This section discusses special programming considerations for using SmartDataViewers.
Adding SmartObjects to SmartDataViewers
You add SmartDataFields to a SmartDataViewer after you pick all of the fields that will appear in the viewer. For details on how to add SmartDataFields, see the “Adding SmartDataFields to SmartDataViewers” section.
The SmartDataViewer does not support communications with contained SmartObjects other than SmartDataFields. It is possible to drop other SmartObjects onto a SmartDataViewer—its adm-create-objects procedure will run and initialize them—but there is no built‑in support for doing so.
Inheriting Data Dictionary validation expressions
The SmartDataViewer’s template is defined with the USE-DICT-EXPS property to allow the viewer’s fields to inherit Data Dictionary validation expressions and help messages. If this property is not enabled, the SmartDataViewer does not inherit Data Dictionary validation settings regardless of the Inherit Dictionary Validation Expressions column option of the viewer’s SmartDataObject.