Making a request to another page

2008-12-22 Thread Suri

Hi all,
I'm trying to do the following.

As part of how I'm modeling my exception handling, I decided that to
be consistent with my current Struts model -  I would redirect the
user to a generic error page in case of an error. Thus, any exceptions
in the GWT should also be handled in the same manner.

I figured I could just use the RequestBuilder to send my request
along. However, I see that the problem here is that it requires a
RequestCallback instance in order to make the request. I probably
could fake a callback and let it pass, but I wanted to check with the
experts to see if there was a more appropriate way to do this. Does
this mean that there is no way of making a request/call to the server
without providing a callback?


Thanks
Suri
--~--~-~--~~~---~--~~
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-Toolkit@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: Making a request to another page

2008-12-22 Thread Reinier Zwitserloot

RequestBuilder makes an AJAX call. It doesn't redirect the browser.
use setLocation for that, which I think is in the standard GWT API
someplace. Otherwise, use some JSNI to do:

window.location.href = http://whatever.com/;;

if you really meant to make an AJAX call: Yes, you need a callback.
You don't have to put anything in it, though.

On Dec 22, 11:06 pm, Suri sviswanad...@gmail.com wrote:
 Hi all,
 I'm trying to do the following.

 As part of how I'm modeling my exception handling, I decided that to
 be consistent with my current Struts model -  I would redirect the
 user to a generic error page in case of an error. Thus, any exceptions
 in the GWT should also be handled in the same manner.

 I figured I could just use the RequestBuilder to send my request
 along. However, I see that the problem here is that it requires a
 RequestCallback instance in order to make the request. I probably
 could fake a callback and let it pass, but I wanted to check with the
 experts to see if there was a more appropriate way to do this. Does
 this mean that there is no way of making a request/call to the server
 without providing a callback?

 Thanks
 Suri
--~--~-~--~~~---~--~~
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-Toolkit@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
-~--~~~~--~~--~--~---