Busy plugin, web client inheritance issue?

Questions and answers on developing, deploying and using plugins and JavaBeans

Busy plugin, web client inheritance issue?

Postby johann.agcanas » Thu Sep 26, 2013 2:52 am

Hi everyone,

I have an issue with the Busy plugin. We have a large solution with dozens of modules and basically all forms are linked via an inheritance hierarchy tree. One form acts as a base and all modules are opened in a new window.

On smart client, it works perfectly. All the busy implementations work independently on each window. The web client however, only works on the base form, and does nothing when it hits the plugins.busy.block(params); function.

On the base form, I have placed the
Code: Select all
if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT) {
    plugins.busy.prepare();
}


It may be worth noting that all module forms inherits the onShow function from the base form.

As a test, I used identical code on the base form and the module being opened:
Code: Select all
function onActionBusy(event) {
   var params = {
      processFunction: superBusy,
      message: 'It works!',
      opacity: 0.5,
      paneColor: '#000000',
      textColor: '#FFFFFF',
      showCancelButton: false,
      cancelButtonText: null,
      dialogName: 'Busy-ness',
      fontType: '\'Verdana\', SM_FONTSTYLE.BOLD, 32',
      processArgs: null
   };
   plugins.busy.block(params);
}

function superBusy() {
   application.updateUI();
   try {
      application.output('Is busy working?');
      application.sleep(2000);
   } finally {
      plugins.busy.unblock();
   }
}


Connected to a button, it works flawlessly on the base form, whereas on any module I copy the code into, superBusy() is never called. I do see the small 'Loading...' text on the top right for a split second every time I press the button.

Any ideas ? My assumption is that due to it working fine in smart client, it has something to do with the plugins.busy.prepare() function. I have tried moving it onto an override onShow on the module form calling it, but no luck.

EDIT: I have made a new solution and the prepare function inherits fine. I think it may be due to the way the windows are cloned and created in the large solution.
johann.agcanas
 
Posts: 5
Joined: Thu Sep 26, 2013 2:40 am

Re: Busy plugin, web client inheritance issue?

Postby ptalbot » Thu Sep 26, 2013 5:10 pm

I don't think the prepare() function is the issue there...
All it does is inject a header in the page.
I would think the callback function is not found for some reason...

Hard to tell without a precise sample.
I would advise you to build a sample that reproduces this and open an issue on ServoyForge with the sample attached.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 9 guests