Kbase 20764: ADM2. How to Simulate GroupAssign link Using Different Window
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
ADM2. Way to use GroupAssign link between viewers in different SmartContainers.
FACT(s) (Environment):
Progress 9.x
FIX:
When you use SmartContainers inside of another SmartContainer, you can add data or update passThrough links. Because SmartContainers do not support GroupAssign links, it is not possible to add a GroupAssign passThrough link between viewers in different SmartContainers.
The following example illustrates how to simulate GroupAssign links between viewers in different SmartContainers. The main window has a SDO, SDV-1, SmartContainer and SmartPannel. The SmartContainer has a SDV-2, a 'GroupAssign' link with the SDV-1, and a 'Data' link with the SDO (both of them in the main windows):
/***********************************************
initializeObject in main window
***********************************************/
DEFINE VARIABLE hViewer AS HANDLE NO-UNDO.
/*Get the viewer handle using the getViewerHandle function defined in the SmartContainer*/
ASSIGN hViewer = DYNAMIC-FUNCTION('getViewerHandle':U IN <SmartContainer-handle>).
/*Add the Data link with the SDO*/
RUN addLink (<SDO-handle>, 'Data':U, hViewer).
/*Add the GroupAssign link between SDV*/
RUN addLink (<SDV-1-handle>, 'GroupAssign':U, hViewer).
/***********************************************
function getViewerHandle in SmartCOntainer.
***********************************************/
FUNCTION getViewerHandle RETURNS HANDLE:
RETURN <SDV-2-handle>.
END FUNCTION.