Kbase P63708: ADM2. Can a SmartPanel be used to used to update two SmartDa
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/21/2004 |
|
Status: Unverified
GOAL:
Can a SmartPanel be used to used to update two SmartDataBrowsers, depending which page is selected in the smartFolder
GOAL:
How to use one smartPanel with different SDO according to the page of the smartFolder
FACT(s) (Environment):
Progress 9.x
FIX:
Change the link of the smartPanel according to the page where you are. This should be done in an override of the changePage procedure with a code similar to this one:
/* In this example we have two SDO in the page 0 (one against sports.customer
and one against sports.order) and two SDB in two different page (1 and 2)
of the smartFolder */
/* This change the navigation link for a smartPanel of type pnavaico.r */
/*------------------------------------------------------------------------------
Purpose: Super Override
Parameters:
Notes:
------------------------------------------------------------------------------*/
/* Code placed here will execute PRIOR to standard behavior. */
RUN SUPER.
/* Code placed here will execute AFTER standard behavior. */
DEFINE VARIABLE currentPage AS INTEGER NO-UNDO.
ASSIGN currentPage = getCurrentPage().
CASE currentPage:
WHEN 1 THEN DO:
RUN removeLink
( INPUT h_pnavico /* HANDLE */,
INPUT "navigation" /* CHARACTER */,
INPUT h_dsportcustomerall /* HANDLE */).
RUN addLink IN h_folder
( INPUT h_pnavico /* HANDLE */,
INPUT "navigation" /* CHARACTER */,
INPUT h_dsportorderall /* HANDLE */).
END. /* Page 1 */
WHEN 2 THEN DO:
RUN removeLink
( INPUT h_pnavico /* HANDLE */,
INPUT "navigation" /* CHARACTER */,
INPUT h_dsportorderall /* HANDLE */).
RUN addLink IN h_folder
( INPUT h_pnavico /* HANDLE */,
INPUT "navigation" /* CHARACTER */,
INPUT h_dsportcustomerall /* HANDLE */).
END. /* Page 2 */
END CASE.
END PROCEDURE.