Lothar,
good point but i think that's the beauty of GWT code,
they already have one parameter(timeoutMillis) in following call( i
have not tested it, if it works or not but i guess it will work.)

    Request request = new Request(xmlHttpRequest, timeoutMillis,
callback);

So if call doesnt get finish in that time it will timeout and your UI
will be working fine.

I am copy pasting the full function here

private Request doSend(String requestData, RequestCallback callback)
      throws RequestException {
    JavaScriptObject xmlHttpRequest = httpRequest.createXmlHTTPRequest
();
    String openError;
    if (user != null && password != null) {
      openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true,
          user, password);
    } else if (user != null) {
      openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true,
          user);
    } else {
      openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true);
    }
    if (openError != null) {
      RequestPermissionException requestPermissionException = new
RequestPermissionException(
          url);
      requestPermissionException.initCause(new RequestException
(openError));
      throw requestPermissionException;
    }

    setHeaders(xmlHttpRequest);

    Request request = new Request(xmlHttpRequest, timeoutMillis,
callback);

    String sendError = XMLHTTPRequest.send(xmlHttpRequest, request,
        requestData, callback);
    if (sendError != null) {
      throw new RequestException(sendError);
    }

    return request;
  }


On Mar 10, 4:37 pm, Lothar Kimmeringer <[email protected]> wrote:
> ping2ravi schrieb:
>
> > Do you see any problem in having synchronous calls.? except that it
> > may hang the UI for a second and that is acceptable.
>
> If the server is not available or the request get lost for some
> other reason, the UI of the browser hangs for a couple of minutes
> and not seconds.
>
> Regards, Lothar
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to