Consultor Eletrônico



Kbase P68395: Dynamics. How to change to a specific page in a Tab Folder
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/02/2004
Status: Unverified

GOAL:

Dynamics. How to change to a specific page in a Tab Folder

FACT(s) (Environment):

Dynamics 2.1A

FIX:

The changePage Procedure that views (and creates if necessary) objects on a newly selected page in a Container when CurrentPage is reset.

The changePage procedure is normally used internally and called from either selectPage or viewPage. Although you can customize changePage to perform some

application-specific task each time a page is changed, if it is called from selectPage (the standard methods for switching pages within a Container), the previous page will have

already been hidden.

The changePage procedure expects the CurrentPage property to have been set to the new page before it is called.

The changePage procedure does not hide the previously selected page. This is done before it is called from selectPage. If it is called from viewPage, the previous page is not hidden first. This would be the case if the new page is a SmartWindow to be viewed in addition to the current page in its container.

The changePage procedure first publishes changeFolderPage to let the associated
SmartFolder visualization, if any, know about the page change.

If the new page is not page zero (which is always initialized at startup), and the objects on the page have not yet been created, changePage runs createObjects to create all the SmartObjects on the new page. If the SmartContainer itself has been initialized, it also publishes "initializeObject" to initialize the new objects, and publishes "viewObject" to view them.

/* Display the current page number in a fill-in field whenever the page is
changed.*/

PROCEDURE changePage:
RUN SUPER. /* Perform the standard code first. */
FILL-IN-1:SCREEN-VALUE IN FRAME {&FRAME-NAME} = STRING(DYNAMIC-FUNCTION("getCurrentPage":U)).
END PROCEDURE.