The technique I am most familiar with involves using zindex to place a visual element "over" the active UI -- thus preventing any user interaction with the UI. You can style your own dialog or use a progress bar or something to indicate to the user that activity is taking place.
Create yourself a custom widget so that this "waiting" dialog and the UI protection becomes a reusable component in your applications.
You will commonly see the visual element that acts as the UI overlay styled such that it is semi-opaque rather than completely translucent. This further indicates to the user that the UI is not active.
Here's an example of a semi-opaque element that you could use to provide the UI protection:
greyBox HTML { position = "absolute", visibility = "hidden", zIndex = 5000, background = "lightgrey", opacity = 0.5, x = 0, y = 0 };
Add this to the DOM in your custom widget's onConstruction function with the following (this way you don't have to make it a child element in your application's UI):
document.body.appendChild(greyBox);
Set a width and height for "greyBox" appropriately to cover your UI. Then, when you set visibility="visible", the UI will be protected.
A full implementation might allow you to specify a zIndex to use for the overlay and a determine a width/height for the UI using a technique such as:
gbwidth int = document.body.parent.getAttribute("scrollWidth"); gbheight int = document.body.parent.getAttribute("scrollHeight");
Your custom widget will also need "show/hide" type functions or use the InfoBus so that it can be easily controlled.
--Dan
dan_darnell