gbc.api.pages

Functions that report the state of child pages in browser multi page mode.

The gbc.api.pages module reports the state of child pages in browser multi page mode. In this mode, a child program started with RUN ... WITHOUT WAITING opens in its own dedicated browser tab, instead of sharing the current one.

For more information, see the browserMultiPage UserInterface style attribute and Containers for program windows in the Genero Business Development Language User Guide.

Both functions take no argument. They only report state, they do not change anything.

Table 1. gbc.api.pages functions
Function Description
gbc.api.pages.countChildren() Reports the number of child pages currently open. Always returns a number: 0 if none are open, never null or undefined.
gbc.api.pages.isMultiPageActive() Reports whether the session is actually running in browser multi page mode.

Call countChildren() on the master page since it is tracked there. A child page always returns 0. Outside browser multi page mode it also returns 0, since children started with RUN WITHOUT WAITING are application list entries, not pages.

Browser multi page mode needs both the session and the GAS to support it. Setting browserMultiPage="yes" in the Genero presentation style (.4st) only requests the mode. It does not guarantee that the GAS activates it. isMultiPageActive() reports whether the mode is actually active right now, not only what was requested in the .4st file.