Kbase P98492: How to select browse rows on multiple pages without navigating the parent SDO.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  07/12/2004 |
|
Status: Unverified
GOAL:
How to select browse rows on multiple pages without navigating the parent SDO.
GOAL:
How to refresh foreign field values between linked SDO's on separate pages.
FIX:
Use an InitializeObject override in the container window to get the handles of the linked SDO's. With these you can then publish dataAvailable from the SDO's refreshing the foreign field values. For example in a smartWindow with three pages, page 1 customer SDO and SDB, Page 2 order SDO and SDB, and page 3 orderline SDO and SDB, the smartWindow initializeObject procedure would look like:
/* Code placed here will execute PRIOR to standard behavior. */
RUN initPages ('1,2,3':U) NO-ERROR.
RUN SUPER.
/* Code placed here will execute AFTER standard behavior. */
DEFINE VARIABLE h_SDO AS HANDLE NO-UNDO.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE cTargets AS CHARACTER NO-UNDO.
DEFINE VARIABLE h_SDOHandle AS HANDLE NO-UNDO.
DEFINE VARIABLE h_orderSDO AS HANDLE NO-UNDO.
DEFINE VARIABLE cType AS CHARACTER NO-UNDO.
DEFINE VARIABLE cName AS CHARACTER NO-UNDO.
cTargets = DYNAMIC-FUNCTION('getContainerTarget':U IN TARGET-PROCEDURE).
/* get customer SDO handle */
DO i = 1 TO NUM-ENTRIES(cTargets):
h_SDO = WIDGET-HANDLE(ENTRY(i,cTargets)).
cType = DYNAMIC-FUNCTION('getObjectType':U IN h_SDO).
cName = DYNAMIC-FUNCTION('getObjectName':U IN h_SDO).
IF cName = "dcust" THEN LEAVE.
END.
cTargets = DYNAMIC-FUNCTION('getDatatarget':U IN h_sdo).
/* get order SDO handle */
DO i = 1 TO NUM-ENTRIES(cTargets):
h_orderSDO = WIDGET-HANDLE(ENTRY(i,cTargets)).
cType = DYNAMIC-FUNCTION('getObjectType':U IN h_orderSDO).
cName = DYNAMIC-FUNCTION('getObjectName':U IN h_orderSDO).
IF cName = "dord" THEN LEAVE.
END.
PUBLISH "dataAvailable" FROM h_SDO("FIRST":U).
PUBLISH "dataAvailable" FROM h_orderSDO("FIRST":U).