Progress Indicator revealed


Some of our customers have been asking us about the ProgressIndicator that appears on Intraweb forms. It was added sometime ago but not fully functional. I've been working on it for the past couple of days trying to get it finished for the next release and we're very close. Just some bugs to iron out and some minor features to add. In this post I'll give you a general idea of what it is and why it came about.

[Disclaimer: this is work in progress, so some things might change from now to the time of release. I'm also interested in feedback]

We introduced our support for Ajax over a year ago, and we did this by providing events that you can call (and having worked with other frameworks, I'm still amazed at the simplicity of Ajax support in Intraweb...in terms of end-user that is). The reason we've called these events OnAsyncXXX is because Ajax calls can be made in two ways: synchronously and asynchronously. Async isn't really to distinguish it from the OnXXX events, but to indicate that the Http request made via XMLHttpRequest is an asynchronous call. This type of call prevents the page from locking up and other requests can be made and it's also the most flexible. However, it also introduces a problem.

I've always advocated that Ajax calls shouldn't be made in all cases. There are certain types of requests that make more sense with a full page submit (requests that refresh many controls on a page for example). At the same time the purpose of Ajax is to allow a more fluid interaction with the user. This implies that many of the calls made should be short-lived, not long running processes. However, there are many times where you have a complex page with a lot of data, and you do not want to use a full submit, for instance a long running query against a database. If there isn't a need to refresh the whole page, why cause a full submit?

Due to this scenario, where you need the best of both worlds, that is, the form "locking" effect that you get on a full submit and the reduced data interchange caused by an asynchronous callback, is where TIWProgressIndicator comes into play. It's a non-visual control that you link up to your form. Every asynchronous callback will now use this component to provide status information during a callback. Here's a screenshot of it in action

(Apologize for the bad contrast).

What is happening is that on the asynchronous call, the screen locks and some status information is displayed. The display is completely configurable, either by setting individual properties or using Css.

Here is the same form at design-time, as well as the object inspector showing the properties for the progress indicator control.

It doesn't end here though. If you look at the properties, there are three interesting one, actually there are 4 but one is public. This last one, is called DivTag and it allows you to specify what you want shown when the progress is called. This means that you can pretty much display whatever it is you want, completely overriding the default progress information. You also have two properties called PreScript and PostScript. These are Javascript code that will be called prior to the Ajax call and after the Ajax call. This allows you to hide your custom tags, show information, pretty much do anything you want. And all this is acomplished by setting the UserDefined property to True. By doing this, I've tried to make the progress indicator as flexible as possible and not restricting you to use what comes built in. Again, it's still not entirely finished and I'm open to comments and suggestions. But so far, this is what we have and you'll be able to play with it very soon.


Comments: 

Shloma Baum 2008-01-04 08:26:54
Hadi,

Very cool indeed, but what I would like to see is that this component have the ability to be tied not directly tied to the whole form but rather to parts of it, like Regions etc.

Regards,
Shloma

Hadi Hariri 2008-01-04 10:43:14
Shloma,

Thanks for the feedback. The idea is that any container could have one. As such, Forms and Regions would qualify. It wouldn't be hard to extend it. However, can you tell me a little bit what usage you'd get out of this?

Delphi 2008-01-05 05:33:32
Pls add more screenshots.
pascual aguayo 2008-01-28 07:39:24
hello, you have some example because not undertand with operator with this object please, its possible sendme one example

thank

Had 2008-01-28 11:58:34
Pascal, it's not released yet. When we release it you can follow the steps outlined here. It's pretty simple.
Jörg Schiffmann 2008-12-09 07:17:58
Hi Hadi,
we've met at EKON 12 this year. I was in your IW spec. session.
Is this component in the described version part of IW 9.0.42?
Regards
Joerg

Hadi Hariri 2008-12-09 11:20:34
Hi Jörg,

Yes it's in 9.0.42 and later.

Jörg Schiffmann 2008-12-09 11:52:03
THX,
but I tried a little test app (iw 9042) (button with async click, do something like sleep, and iwprogressindicator) But nothing happens..., no indicator...or I haven't got a clue!


Add your comment: 

Name:  
E-Mail:  
URL:  
Comment:  
Please add 6 and 5 and type the answer here: