Project

General

Profile

Feature #507

Add updatable progress bar

Added by Hugh Summerhays almost 12 years ago. Updated almost 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
05/11/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
Any

Description

Hi Patrick,

Thank you so much for this wonderful plugin. It is already a very important part of our application here at Mainstream Data/Newscom.

Might you have some time (or someone else who knows this stuff like you do) to enhance the plugin to show a progress bar and message that can be updated from within a running Servoy method? It seems like a new method could be created that is similar to plugins.busy.unblock(), but that takes a value and a message to display and updates the screen (e.g. plugins.busy.update(50, "500 out of 1000 records have been processed")). Also, I wonder if there is already a swing/wicket progress bar that could be utilized.

If no one takes this on, perhaps I will have some time in the future to look at it - ah the beauty of servoyforge. :)

History

#1

Updated by Patrick Talbot almost 12 years ago

As much as a Swing option would be relatively easy to do, a Web function like this would never be possible...
Because there's only one Ajax channel from a plugin to the web client (and back), and this one is already used by Servoy to wait for the result of the first call that triggers your process, any other calls would be queued and would happen AFTER the process is finished.
I had to jump a lot of hoops to make this work for a 'Cancel' button (using a dedicated servlet and some synchronization, and it also seems that in some cases it is not even working reliably), but updating the browser from inside your process is simply not possible, unless Servoy's Wicket lib changes profoundly its behavior.

#2

Updated by Hugh Summerhays almost 12 years ago

Thanks for the info Patrick. Now I am thinking that perhaps I could "fake it" by recursively calling my function that processes the records. That way I can use the Servoy channel to refresh a form in Servoy. But, that means I won't be using the busy plugin in that case. However it is still very useful for situations where I don't know how long Servoy will take (e.g. during a find/search).

#3

Updated by Patrick Talbot almost 12 years ago

You might want to use a headless client (with the headless client plugin) in that case.

#4

Updated by Scott Butler almost 12 years ago

You could do it the standard web/ajax way. Build a web service with the restful web serviice plugin, then use the WebClientUtils plugin to call your webservice. databroadcasting should take over when your webservice saves data so you could use that to show the updates, or have your webservice to a JSONP callback into a function created with the WebClient Utils so it will callback to a Servoy function.

#5

Updated by Patrick Talbot almost 12 years ago

The only thing I would say about what Scott proposed is:
Instead of using the restful web service plugin, use Velocity instead: much easier and a lot more powerful! ;)

#6

Updated by Hugh Summerhays almost 12 years ago

Thanks for the insight and suggestions Patrick and Scott. Since this is starting to sound more like a forum post than a feature request, and may help some other people, I will post a link to this issue from this forum post: https://www.servoy.com/forum/viewtopic.php?f=15&t=17302.

Also available in: Atom PDF