Re: Request.cancel doesn't work for me!
You can have the initial RPC request kick off a sub-process (new thread, pass a message to another process, etc..) and then return some sort of id to your client that uniquely identifies the particular process the user initiated. The client can then emulate the blocking w/ a dialog or something like that while polling the server to find out the state of your subprocess by passing the id it received back from the initial call. Create another method that can cancel the process given the id...then if the user hits some sort of cancel button (or you hit some sort of time limit), you send the id to the cancel method and the backend handles canceling out the process. On Dec 7, 12:20 pm, newnoise tommmuel...@googlemail.com wrote: Ok. Too bad ... Is there any way to abort the running method on my server? Thanks Tom On 7 Dez., 16:54, jhulford jhulf...@gmail.com wrote: All calling it does is call the abort() method of XmlHttpRequest which will stop the execution of your callback, it doesn't do anything on your server. Check theRequest.cancel() code..it's pretty straightforward. On Dec 7, 7:01 am, newnoise tommmuel...@googlemail.com wrote: Does really no one got any idea? On 29 Nov., 18:29, newnoise tommmuel...@googlemail.com wrote: Me again, just tried to make the imExpensive-method less complex, but still no success. TheRequestis not cancelled ... What am I doing wrong? Thanks Tom On Nov 29, 6:16 pm, newnoise tommmuel...@googlemail.com wrote: Hi, I'm working on an GWT-App displaying a map with different layers. Some of those layers are drawn just onrequestand just for the part of the map which is currently displayed. The Problem occurs if a user moves and zooms the map pretty fast, so that a lot of pictures have to be drawn. This results in quite a time of waiting when he finally stops. What I tried was tocancelthe requestusingRequest.cancel(the Async Method returnsRequestinstead of void), but all the pictures are drawn anyway. How does theRequest.cancel-method work? Is it just blocking the Callback? Or does it actuallycancelthe running code on server-side? Maybe the problem is, that the specific method contains mainly one complex method-call? The specific method-scheme looks like: public Boolean update() { int a = 2; int b = 3; int x = imExpensive(a,b); // method which needs like 95% of calculating time if (x0) return true; return false; } I suppose that theRequest.cancel-method does notcancela running method, and stops the method right after imExpensive(). Is that right? In that case the problem could be solved by making the method imExpensive less complex, which would be a pretty doable task ... Thanks a lot! Tom -- 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.
Re: Request.cancel doesn't work for me!
Does really no one got any idea? On 29 Nov., 18:29, newnoise tommmuel...@googlemail.com wrote: Me again, just tried to make the imExpensive-method less complex, but still no success. TheRequestis not cancelled ... What am I doing wrong? Thanks Tom On Nov 29, 6:16 pm, newnoise tommmuel...@googlemail.com wrote: Hi, I'm working on an GWT-App displaying a map with different layers. Some of those layers are drawn just onrequestand just for the part of the map which is currently displayed. The Problem occurs if a user moves and zooms the map pretty fast, so that a lot of pictures have to be drawn. This results in quite a time of waiting when he finally stops. What I tried was tocancelthe requestusingRequest.cancel(the Async Method returnsRequestinstead of void), but all the pictures are drawn anyway. How does theRequest.cancel-method work? Is it just blocking the Callback? Or does it actuallycancelthe running code on server-side? Maybe the problem is, that the specific method contains mainly one complex method-call? The specific method-scheme looks like: public Boolean update() { int a = 2; int b = 3; int x = imExpensive(a,b); // method which needs like 95% of calculating time if (x0) return true; return false; } I suppose that theRequest.cancel-method does notcancela running method, and stops the method right after imExpensive(). Is that right? In that case the problem could be solved by making the method imExpensive less complex, which would be a pretty doable task ... Thanks a lot! Tom -- 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.
Re: Request.cancel doesn't work for me!
All calling it does is call the abort() method of XmlHttpRequest which will stop the execution of your callback, it doesn't do anything on your server. Check the Request.cancel() code..it's pretty straightforward. On Dec 7, 7:01 am, newnoise tommmuel...@googlemail.com wrote: Does really no one got any idea? On 29 Nov., 18:29, newnoise tommmuel...@googlemail.com wrote: Me again, just tried to make the imExpensive-method less complex, but still no success. TheRequestis not cancelled ... What am I doing wrong? Thanks Tom On Nov 29, 6:16 pm, newnoise tommmuel...@googlemail.com wrote: Hi, I'm working on an GWT-App displaying a map with different layers. Some of those layers are drawn just onrequestand just for the part of the map which is currently displayed. The Problem occurs if a user moves and zooms the map pretty fast, so that a lot of pictures have to be drawn. This results in quite a time of waiting when he finally stops. What I tried was tocancelthe requestusingRequest.cancel(the Async Method returnsRequestinstead of void), but all the pictures are drawn anyway. How does theRequest.cancel-method work? Is it just blocking the Callback? Or does it actuallycancelthe running code on server-side? Maybe the problem is, that the specific method contains mainly one complex method-call? The specific method-scheme looks like: public Boolean update() { int a = 2; int b = 3; int x = imExpensive(a,b); // method which needs like 95% of calculating time if (x0) return true; return false; } I suppose that theRequest.cancel-method does notcancela running method, and stops the method right after imExpensive(). Is that right? In that case the problem could be solved by making the method imExpensive less complex, which would be a pretty doable task ... Thanks a lot! Tom -- 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.
Re: Request.cancel doesn't work for me!
Ok. Too bad ... Is there any way to abort the running method on my server? Thanks Tom On 7 Dez., 16:54, jhulford jhulf...@gmail.com wrote: All calling it does is call the abort() method of XmlHttpRequest which will stop the execution of your callback, it doesn't do anything on your server. Check theRequest.cancel() code..it's pretty straightforward. On Dec 7, 7:01 am, newnoise tommmuel...@googlemail.com wrote: Does really no one got any idea? On 29 Nov., 18:29, newnoise tommmuel...@googlemail.com wrote: Me again, just tried to make the imExpensive-method less complex, but still no success. TheRequestis not cancelled ... What am I doing wrong? Thanks Tom On Nov 29, 6:16 pm, newnoise tommmuel...@googlemail.com wrote: Hi, I'm working on an GWT-App displaying a map with different layers. Some of those layers are drawn just onrequestand just for the part of the map which is currently displayed. The Problem occurs if a user moves and zooms the map pretty fast, so that a lot of pictures have to be drawn. This results in quite a time of waiting when he finally stops. What I tried was tocancelthe requestusingRequest.cancel(the Async Method returnsRequestinstead of void), but all the pictures are drawn anyway. How does theRequest.cancel-method work? Is it just blocking the Callback? Or does it actuallycancelthe running code on server-side? Maybe the problem is, that the specific method contains mainly one complex method-call? The specific method-scheme looks like: public Boolean update() { int a = 2; int b = 3; int x = imExpensive(a,b); // method which needs like 95% of calculating time if (x0) return true; return false; } I suppose that theRequest.cancel-method does notcancela running method, and stops the method right after imExpensive(). Is that right? In that case the problem could be solved by making the method imExpensive less complex, which would be a pretty doable task ... Thanks a lot! Tom -- 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.
Request.cancel doesn't work for me!
Hi, I'm working on an GWT-App displaying a map with different layers. Some of those layers are drawn just on request and just for the part of the map which is currently displayed. The Problem occurs if a user moves and zooms the map pretty fast, so that a lot of pictures have to be drawn. This results in quite a time of waiting when he finally stops. What I tried was to cancel the request using Request.cancel (the Async Method returns Request instead of void), but all the pictures are drawn anyway. How does the Request.cancel-method work? Is it just blocking the Callback? Or does it actually cancel the running code on server-side? Maybe the problem is, that the specific method contains mainly one complex method-call? The specific method-scheme looks like: public Boolean update() { int a = 2; int b = 3; int x = imExpensive(a,b); // method which needs like 95% of calculating time if (x0) return true; return false; } I suppose that the Request.cancel-method does not cancel a running method, and stops the method right after imExpensive(). Is that right? In that case the problem could be solved by making the method imExpensive less complex, which would be a pretty doable task ... Thanks a lot! Tom -- 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.
Re: Request.cancel doesn't work for me!
Me again, just tried to make the imExpensive-method less complex, but still no success. The Request is not cancelled ... What am I doing wrong? Thanks Tom On Nov 29, 6:16 pm, newnoise tommmuel...@googlemail.com wrote: Hi, I'm working on an GWT-App displaying a map with different layers. Some of those layers are drawn just on request and just for the part of the map which is currently displayed. The Problem occurs if a user moves and zooms the map pretty fast, so that a lot of pictures have to be drawn. This results in quite a time of waiting when he finally stops. What I tried was to cancel the request using Request.cancel (the Async Method returns Request instead of void), but all the pictures are drawn anyway. How does the Request.cancel-method work? Is it just blocking the Callback? Or does it actually cancel the running code on server-side? Maybe the problem is, that the specific method contains mainly one complex method-call? The specific method-scheme looks like: public Boolean update() { int a = 2; int b = 3; int x = imExpensive(a,b); // method which needs like 95% of calculating time if (x0) return true; return false; } I suppose that the Request.cancel-method does not cancel a running method, and stops the method right after imExpensive(). Is that right? In that case the problem could be solved by making the method imExpensive less complex, which would be a pretty doable task ... Thanks a lot! Tom -- 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.