Reputation: 20150
Is it possible to make a gwt rpc blocking? i.e. the application blocks until a response is received from the server
Upvotes: 1
Views: 5905
Reputation: 4046
The most simple solution that came to my mind would be to "block" your application from the point where the Asynchronous call starts till the filling is completed, which would be at the end of the onSuccess()
method.
By blocking I mean just to show some animated loading gif in the middle of the page.
Upvotes: 0
Reputation: 21300
Well, synchronus rpc calls are called as evils by GWT designers. They do have very strong arguments... But you can succeed synchronous rpc by means of hacks..Here is one of them, http://code.google.com/p/google-web-toolkit/issues/detail?id=4898
Upvotes: 1
Reputation:
As far as I know there is no gwt rpc blocking because it is opposite idea to the asynchronous callback.
But you can use these two methods
onSuccess()
method. It guarantees that your method is finished and successfully finished then continue to other methods.My advise is 2nd one (onSuccess). I want to mention again that blocking is never a good idea
Upvotes: 4