skip to main content
OpenEdge Development: ADM and SmartObjects
SmartLinks : SmartLink overview
SmartLink overview
SmartLinks are an important element of the ADM architecture. A SmartLink is a bidirectional association of two SmartObjects. It establishes how one SmartObject relates to another and what sort of behavior each can expect from the other. SmartLinks also are part of the overall ADM messaging scheme (communication between SmartObjects).
A SmartObject associated with another by a SmartLink serves as either the link’s source object or its target object. Data flows across the SmartLink primarily from the source to the target, but in some circumstances, from the target to the source.
SmartLinks are created and maintained by each SmartObject’s container. Each link is a property in each SmartObject that supports that type of link. The smart.p super procedure has procedures and functions for link management. Each link is mapped to one or more events that use the PUBLISH and SUBSCRIBE statements. These event lists also are SmartObject properties. For more information on PUBLISH and SUBSCRIBE, see the PUBLISH and SUBSCRIBE entries in OpenEdge Development: ABL Reference.
SmartLink types
The SmartLink type determines the kind of relationship that is established between two objects. Table 3–1 describes the relationships that these SmartLinks establish and gives examples (in parentheses) of SmartObjects that support each SmartLink type.
Table 3–1: ADM‑recognized SmartLink types
SmartLink type
Links a containing object (SmartContainer) to an object that it contains. One SmartObject contains another if it creates the contained SmartObject, regardless of whether the containing object visually parents the contained object.
The ADM automatically establishes all Container SmartLinks at run time. This is why Container SmartLinks do not appear in the AppBuilder.
Links an object that provides a navigation interface (SmartPanel or SmartToolbar) to an object that supplies a query through which to navigate (SmartDataObject).
Links an object that provides a record‑modification interface (SmartPanel or SmartToolbar) to an object through which to enter changes (SmartDataViewer or SmartDataBrowser).
Links an object that provides a page‑selection interface (SmartFolder) to an object that manages the hiding and viewing of pages (SmartContainer).
Links an object that manages the hiding and viewing of a numbered set of pages (SmartContainer) to the SmartObjects on a specific page (holds the object handle and the page that it is on).
Note: Application developers do not normally use this link type.
Links an object that manages a record (SmartDataViewer, considered the master SmartDataViewer) to an object that manages a related record or another view of the same record (SmartDataViewer), to assure that all fields are updated in a single transaction.
This is an advanced task. For details, see the “Using GroupAssign SmartLinks” section.
Links an object that manages records (SmartDataObject) to a visualization object (SmartDataViewer or SmartDataBrowser) or to another object that manages records (SmartDataObject).
Links a visualization object (SmartDataBrowser or SmartDataViewer) to a SmartDataObject for the purpose of passing updated data values from the visualization object to the SmartDataObject.
This is a separate link from the Data link. This is because the data source might not be a SmartDataObject, but all updates must be done through a SmartDataObject. Normally, the Update link associates the same two SmartObjects as a Data link, but in the opposite direction; however, this is not the case if the visualization object gets records from itself or from another source.
Links a Commit SmartPanel to a SmartDataObject for committing changes to sets of database records when it is necessary to perform more than one update in a single transaction.
Links a SmartFilter to a SmartDataObject.
You are not restricted to using these ADM‑recognized SmartLink types. You also can define new SmartLink types and configure SmartObjects to support them.