yugalatea / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

RequestCallback Event on HttpRequest is not working on IE & Chrome. #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: gwt_gears_1.2.0

Detailed description: RequestCallback Event on HttpRequest is not working on IE 
& Chrome.

Below code works well with FireFox, but not on IE or Chrome. However it 
transfers the file contents to Servlet. The Sample file 
given in this release (UploadFileDemo) also doesn't work on IE7 & Chrome.

MyRequestCallback callback = new MyRequestCallback(fileRowPanel[i]);
   request.setCallback(callback);
   request.send(selectedFiles[i]);

.....

class MyRequestCallback implements RequestCallback {

 private MyFileRowPanel panel;
   public MyRequestCallback(MyFileRowPanel panel) {
     this.panel = panel;
   }

   public void onResponseReceived(HttpRequest request) {
    String msg = request.getStatus() + " " + request.getStatusText();
    if (request.getStatus() != 200) {
        panel.getStatus().setHTML("<p style=\"color:red\">&nbsp;" + msg + "</p>");
    } else {
        panel.getStatus().setHTML("<p style=\"color:green\">&nbsp;" + msg + "</p>");
    }
   }
}

Workaround if you have one:

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by csvala...@gmail.com on 14 Feb 2009 at 6:00

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 15 Feb 2009 at 2:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Possibly related to Gears issue 385:
  http://code.google.com/p/gears/issues/detail?id=385

See also  issue 241  which has similar characteristics

Original comment by galgwt.reviews@gmail.com on 15 Feb 2009 at 6:48

GoogleCodeExporter commented 9 years ago
Is there any work around available?

Senthil

Original comment by csvala...@gmail.com on 16 Feb 2009 at 7:55

GoogleCodeExporter commented 9 years ago
Any work around available?

THanks

Original comment by daniele.renda on 18 Mar 2009 at 11:46

GoogleCodeExporter commented 9 years ago
I don't have a workaround at this time.  If Gears isn't delivering up an event, 
there 
isn't much that can be done in the GWT bindings.

Original comment by ericzun...@gmail.com on 19 Mar 2009 at 10:46

GoogleCodeExporter commented 9 years ago
Found a bug in the onreadystatechange callback that was clearing callbacks for 
states 
other than the state where the request is finished.

  http://galgwt-reviews.appspot.com/11602

Original comment by galgwt.reviews@gmail.com on 23 Mar 2009 at 7:03

GoogleCodeExporter commented 9 years ago
We have same problem:

HttpRequest request = factory.createHttpRequest();
request.open("POST", GWT.getModuleBaseURL() + UploadConstants.SERVICE_PATH);
request.setRequestHeader(UploadConstants.PARAM_FILENAME, fileItem.getName());
request.setRequestHeader(UploadConstants.PARAM_COLLECTION, this.collectionName);

// My Custom Callback FileItemRequestCallback implements RequestCallback
RequestCallback uploadedCallback = new FileItemRequestCallback(fileItem);
request.setCallback(uploadedCallback);
request.getUpload().setProgressHandler(fileItem.getProgressHandler());
request.send(fileItem.getFile());

ProgressHandler and RequestCallback No twork with Ie

Original comment by iwo.di...@gmail.com on 8 Apr 2009 at 9:08

GoogleCodeExporter commented 9 years ago
Patch was applied to trunk.  The fix will be in the next release.

Original comment by galgwt.reviews@gmail.com on 8 Apr 2009 at 10:26

GoogleCodeExporter commented 9 years ago
Thanks! It's all ok now! 
We have downloaded and compiled from svn and it's ok. We standby for the next 
release
even.

Best Regards

Original comment by iwo.di...@gmail.com on 8 Apr 2009 at 2:55

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 18 May 2009 at 8:02

GoogleCodeExporter commented 9 years ago
Updating account names

Original comment by zundel@google.com on 21 Dec 2009 at 2:00