On Apr 15, 9:37 am, Sripathi Krishnan <[email protected]> wrote: > The async interface usually has a void return type, but it can optionally > return a Request object, like this - > > import com.google.gwt.http.client.Request; > interface MyServiceAsync { > public Request myMethod(String s, AsyncCallback<String> callback); > > } > > So, after you make your Async call, hold on to the Request object. When you > wish to cancel the calls, invoke the request.cancel() method.
...but keep in mind that the request will have been sent to your server, which will probably do the whole work for all three requests (most server frameworks don't make it easy to detect "abort cases", and most developers therefore don't care doing so). You'd better issue the first request after a short delay (150ms for instance) so you can prevent doing the first 2 requests if the first 3 characters are entered "fast enough" by the user (which is generally the case) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
