But if I return a Request as the return, then what about the data that is supposed to come from server?
- Sunit Katkar http://sunitkatkar.blogspot.com/ On Sat, Nov 20, 2010 at 4:23 AM, Paul Stockley <[email protected]> wrote: > You can cancel RPC requests. Just define your async interface as > returning Request. You can then use the returned Request object to > cancel the call. If you do this you also need to be aware your server > code would throw an IO error due to the connection being closed by the > client. I have a general catch point (doUnexpectedFailure) in my > derivation of RemoteServiceServlet that just ignores these errors. > > On Nov 19, 10:19 pm, Gaurav Vaish <[email protected]> wrote: > > RPC request cannot be cancelled. > > > > Use the method Request::cancel() with RequestBuilder. > > > > Request req = requestBuilder.send(...); > > req.cancel(); //when needed. > > > > -- > > Happy Hacking, > > Gaurav Vaishwww.mastergaurav.com > > > > On Nov 20, 12:47 am, Sunit Katkar <[email protected]> wrote: > > > > > > > > > > > > > > > > > I Googled and also this group but could not find an answer. > > > > > Here is the use case: > > > > > 1) User enters a value in a textfield and clicks Submit button > > > 2) The GWT RPC request has been sent to the server where it will take > some > > > time to process. (Say 10 or 15 seconds) > > > 3) But before the request can be seviced by the server and and the > > > onSuccess() is called on the client side, the user needs to do > something > > > else, which requires that this request be killed. > > > > > How do you kill a just fired GWT RPC request? We cannot provide a > separate > > > UI button which the user clicks to send a KILL request to the server > with a > > > request id, etc. However, we can allow for 'kill just fired request' > code > > > when user navigates to another part of the screen or does the new > action. > > > > > Any ideas? > > > > > Thanks. > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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.
