Project

General

Profile

About v1.0

Description

This version of the busy plugin is web compatible, using jQuery and the jQuery-blockUI plugin for the Wicket counterpart of the Swing component.

NB This doc if for the version of the plugin compatible with Servoy before 5.1
For versions >= 5.1, check this page

It has been tested on Windows with Servoy 3.5.10, 4.1.x and 5.x in developer/smart/web client.
It has been tested on IE and Firefox, so please report if you find any unknown problems with your platform/browser.

The previous version made use of 3 methods:
  • busy()
  • ready()
  • isCanceled()

All 3 methods have been deprecated.
Meaning that they should still work as usual in your current solution, but they will not appear anymore in the Solution Explorer plugins tree methods, and I would recommend not to use it anymore.

You are strongly advised to make use of the three new methods instead:
  • prepare()
  • block()
  • unblock()

These three methods only will allow for web compatibility!

The block method takes a JavaScript Object {} as parameter, which properties are almost all optional...

Example of usage

First you need to initialize the plugin for web client in the pages you will use it, this is done in the onShow event, like so:

if (application.getApplicationType() == 5) {
    plugins.busy.prepare();
}

Then you use the block() method like so:

        var params = {
            processFunctionName: 'globals.process',
            message: 'Lengthy process... please wait!', 
            opacity: 0.5,
            paneColor: '#000000',
            textColor: '#FF0000',
            showCancelButton: true,
            cancelButtonText: 'Stop this now!',
            callBackFunction: globals.callBack
    };
    if (theDialogName) {
        params.dialogName = theDialogName;
    }
    plugins.busy.block( params );

and then later, in your process method you simply unblock() to release the GUI:

        plugins.busy.unblock();

Download the sample solution for example of usage, with parameters, in the main frame or dialogs.
There is one available for 3.5.x and one for 4.1.x/5.x

Available parameters

  • processFunctionName: mandatory - the name (as String) of the function (without parenthesis) that will contains the 'lengthy' process
    which will be started by the plugin, if the form is in a tab panel, you will have to prefix the name of the function with the name of the form: 'theform.thefunction'
  • dialogName: (mandatory if called from a dialog) the name of the dialog
  • message: the message to show (optional, i18n compatible, default=null)
  • opacity: a float value (0..1), where 0=transparent, 1=opaque (optional, default=0.5)
  • paneColor: a color value, (optional, default=black='#000000')
  • textColor: a color value, (optional, default=black='#FFFFFF')
  • showCancelButton: shows a cancel button which will trigger the callback function (optional, default=false)
  • cancelButtonText: text of the cancel button (optional, i18n compatible, default='Cancel')
  • callBackFunction: the javascript function (as a Function) used for callback when using the cancel button (optional, default=null)