This isn't in GWT because this is not a simple generic problem that can be solved universally. That one or more RPC calls are in progress does not imply necessarily that a waiting dialog should be showing. For example say I have a page with several panels that each separately make an RPC call to fetch some data. If one comes back, why not fill it and allow the user to interact with it while the others still load? No need to freeze the whole app. In this case, maybe each panel can have a "Loading..." message that gets changed to good GUI stuff once the data arrives.
That said, it's fairly easy to create your own generic class that can bring up a wait dialog when you do need to wait for something; I have one for my runAsync calls because when I'm waiting for code to load I really don't want any other interaction. You just call to create it before your RPC/runAsync call, and then to remove it on onSuccess and onFailure. Better still is to have a cancel button on it which can be checked and handled in onSuccess. But I'd be leery trying to make one work automatically for all calls, as you are unnecessarily crippling your user experience. On Apr 1, 11:59 am, spacejunkie <priyank.pa...@gmail.com> wrote: > I think Vik is looking for some API which can globally monitor async > calls and fire events. > Such global events can be used to display or hide busy indicators. > > Writing code for busy indicator for each async call creates clutter. > Besides if the same busy indicator is > shared by multiple async calls, one has to write additional logic to > handle concurrent async calls - > for example if one call finishes but other is still in progress and if > the callback simply hides the indicator then the first callback would > hide the indicator and mislead the user into believing that all > processes are complete. > > The state of each call has to be monitored in this case. This isn't > too difficult, but having to replicate same code in every call doesn't > feel right. > > There should be an event or some hook into GWT internals that can tell > if any async call is in progress. > I would like to hear some thoughts on this. > > I have searched a lot and haven't found any API support to do this. > This is a big feature missing in GWT. > If I'm missing out something please point out. > > Regards, > Priyank -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.