Child pages
  • Windows and Dialogs
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

A Servoy Smart or Web Client always comes with a main window. Servoy offers support open new windows or dialogs to show forms.

Window definition

Windows are independent of each other and are only tied to the Client. Closing the Client will close all windows. When a Smart or Web Client is launched it will always open with a window, the so-called main window. Closing the main window will close the Client.

In the Smart Client each window occupies an entry on the system bar. The individual windows can be minimized, maximized and closed independently and can be moved in front of one another. 

In the Web Client a window can be either a separate browser window or an additional tab in the existing browser window, depending the type of browser and/or the browsers configuration. The usefulness of opening new windows in browsers however is limited, due to browser restrictions on opening new windows/tabs programmatically from within a page. Almost any browser nowadays comes out of the box with a popup blocker installed, preventing pages from automatically opening new windows/tabs.

Dialog definition

Dialogs are bound to a parent, being the main window or another window or dialog. A dialog is always on top of its parent and automatically close if their parent is closed. At the top of a hierarchy of dialogs, there is always one window, being either the main window that was automatically launched when launching the Client or an additional window opened at a later stage.

In the Smart Client a Dialog is similar to a Window, with the exceptions that it does not support maximize and minimize operations, on top of the general restrictions applied to dialogs (tied to a parent, always on top of their parent and automatically closed when the parent closes). While a dialog is always op top of it's parent, in the Smart Client the dialog window can be moved around independently and thus be located in such a position as to not overlap it's parent.

In the Web Client a Dialog is displayed inline in the browser window/tab that displays the window in the dialogs parent hierarchy.

Dialog modality

Dialogs can be either modal or non-modal (also referred to as modeless). A modal dialog blocks access to all other dialogs and the window in it's parent hierarchy, whereas non-modal dialogs do not block the access.

In the Smart Client a modal dialog blocks all windows and dialogs, except the dialogs that are opened with the modal dialog in it's parent hierarchy.

In the Web Client a modal dialog block its parent window and all dialogs in it's parent hierarchy TODO: validate this assumption

Dialog 

The main object involved when working with windows is the JSWindow object. Additionally there is the window plugin and the dialogs plugin.

Window Types

Parenting

Development considerations

Smart Client vs. Web Client

JSWindow

Dialogs vs. Window

Retrieving Window context in scripting

Dialogs

Window plugin

Single Window Interface

Multi Window Interface

Execution flow in WC

onhide event

currentcontroller vs controller

Windowing API

application.closeAllWindows()

application.createWindow()

application.getScreenHeight

application.getScreenWidth

application.getWindow

application.isFormIndialog

application.showForm???

JSWindow

plugins.window

  • No labels