Project

General

Profile

Defect #540

Demo solution does not work.

Added by Donald J Lapin over 11 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Start date:
07/31/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
Firefox 14.0.1

Description

I imported the busy plugin demo solution ("busy_busy") into a new workspace for Servoy 6.0.7. When I press the various buttons in the web client (Firefox 14.0.1) nothing happens. The console window in developer displays (12 times):

the processFunction property is mandatory!
Wrapped java.lang.RuntimeException: the processFunction property is mandatory! (/Users/djlapin/servoy6_demoWorkspace/busy_busy/globals.js#67)
at /Users/djlapin/servoy6_demoWorkspace/busy_busy/globals.js:67 (startBusy)
at /Users/djlapin/servoy6_demoWorkspace/busy_busy/forms/busy_form.js:21 (startBusy)

Thank you,
Don


Files

StaysOnScreen.png (119 KB) StaysOnScreen.png Donald J Lapin, 08/01/2012 02:13 AM
BusyInWindowFails.png (126 KB) BusyInWindowFails.png Donald J Lapin, 08/01/2012 02:13 AM

History

#1

Updated by Patrick Talbot over 11 years ago

  • Status changed from New to In Progress

There has been numerous changes in the plugin since the demo solution was created, it needs updating indeed.

In the meantime, you can replace "processFunctionName" in the parameter object with "processFunction" and give it a function instead of a String (simply remove the quotes), and it should work.

#2

Updated by Donald J Lapin over 11 years ago

Hello,

I did as you suggested, and had a bit more success. There were some issues:

1. The message did not go away after the loop was finished ("StaysOnScreen.png").

2. The "Busy in a window" did not work, and generated a message in the console ("BusyInWindowFails.png").

I'm somewhat puzzled by how this works...

1. Since FORM_busyHere() is not called anywhere, how does the plugin get activated? What if there were multiple loop methods on the same form, that needed to be activated at the time that they were run?

2. Is there a way to add a "spinner" widget (like a Flash initialization or Macintosh boot) instead of the red text?

3. Is there some technique that I can use to indicate the percent of progress; or is there some other web tool that I can use to do that? Sort of like the "jira" software when you upload files.

Thank you.

#3

Updated by Donald J Lapin over 11 years ago

Okay, as a follow-up on my questions, I am getting it a little more. The form button calls the plug-in, which itself calls the method...correct?

Thank you.

#4

Updated by Patrick Talbot over 11 years ago

Yes, the processFunction is called by the plugin. This is the one containing your long running processs, it should be a function (not a String and not including the () parenthesis).

You must make sure in your function to use a try { } finally { plugins.busy.unblock(); }

In Web client, you must also call plugins.busy.prepare() in the onShow of your form (this adds the required headers).

A spinner might be done but I'm not sure how in the JQuery.BlockUI lib that I'm using for this.

As to an updating the message, it could be done in Smart client, but in Web client, you're out of luck: since v5.2.x and a Wicket library update, there can be only one Ajax communication channel between the browser's page and the server, each time you are calling a process or waiting for a reply from the server, anything else you do is queued, so there's no way to update the message asynchronously while the browser is waiting for the long process function to be finished. Even if you managed to call a method that updates the browser's page, the result would only appear AFTER the process is finished.

Hope this clarifies.

#5

Updated by Donald J Lapin over 11 years ago

Thank you for replying - Don

#6

Updated by Patrick Talbot about 10 years ago

  • Status changed from In Progress to Rejected

Also available in: Atom PDF