Child pages
  • Windows and Dialogs

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A Servoy Smart or Web Client always comes with a main window and programmatically new windows can be opened or dialogs can be shown on top of existing windows to display Forms.

Stoc

Definitions

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 and all other windows associated with 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.

...

In addition to the ability to open new windows and show dialogs displaying Forms, Servoy also comes with a Dialogs plugin to show standard dialogs. This plugin only has limited support for usage in the Servoy Web Client.

Smart Client modal dialog behavior difference in Java 5 & Java 6

Due to limitations in Java 5 with regards to the modality API of windows and dialogs, a modal dialog in the Smart Client that runs under Java 5 will block ALL windows and dialogs, whereas when running under Java 6 the modal dialog will only block the dialogs and the window in its parent hierarchy.

Through the Smart Client settings on the Servoy Admin page, it's possible to restrict Smart Client to only run on Java 6 (or higher, although Java 6 has not been released yet). See Smart Client Settings for more information on specifying the min/max Java version for Smart Clients.

Web Client compatibility

Differences

As described in the introduction above, there are differences between the Smart Client and the Web Client when it comes to Windows and Dialogs:

...

The Dialogs module on ServoyForge is a drop-in replacement for the dialogs plugin that ships with Servoy and for the modal dialog API of Servoy.  

Windowing API overview

The API for windows and dialogs is located in several locations throughout the scripting API of Servoy:

...