Improve Spinning image when waiting

Answered
0
0

Hello,

When a user launches a long-running process. Instead of displaying a spinning image, i want to show the status of the process. Please advise the best and generic approach to implement this behavior?

Wisej can push data from server to client, so i think this should be easy.

Thank you.

Illustration of WaitForm

  • You must to post comments
Best Answer
0
0

With Wisej you don’t have all the limitations of ASP.NET request/response model. You can use anything you like to provide feedback: progress bar, status bar, alert box, labels, text, anything. No need to block the screen (unless you want to) with wait forms.

The little spinning icon you see when a request takes long kicks in only for “in-bound” requests. Those are the requests initiated by the browser using because of a user action: click, resize, close, etc. Wisej expects the server to reply within a certain amount of time before showing the spinning icon and another amount of time before declaring a timeout.

https://docs.wisej.com/docs/concepts/configuration

Look for responseTimeout and loaderTimeout. You can set loaderTimeout high enough so that it doesn’t show. However, a much better approach is to start long running tasks on their own and return immediately from the request. This way the spinning icon will never show for background tasks.

Under samples, try the BackgroundTasks sample. It starts three tasks and you never get the spinning icon while the screen is updated. You can also try the sample I attached to this post https://wisej.com/support/question/adding-controls-at-runtime

It’s simple:

Application.StartTask(() => {

// do whatever

Application.Update(this); // This updates any change to any control in the browser.

});

This way, while your task runs, you can show a progress bar, or nothing, or update some text. There are no limits and certainly your are not forced to use a WaitForm.

HTH

Best,

Luca

  • Tung Ngo
    Hello Luca, Thanks for the example. I successfully created a generic wait form using a simple dialog with a spinning icon plus a caption and description. It works as expected. I need my Wisej application having the same behaviors with its winform version. My users already got aquaintance with the winform waitform.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.