I am trying to figure out a way to get a handle on the response of a
request for a csv file when using a form submit. That is creating a
form in gwt and doing form.submit. In case there is an error how i
can catch the 404 or 405 on the gwt side and show it to the user. The
request has to be a POST as well. When doing a request via
RequestBuilder , i have a reference to the response and can get the
csv text as well as the error if anything but how i do prompt the save
or open with window file that normally occurs when the server side
code specifies that the content type being returned is a file. Many
thanks in advance.
e.g using requestBuilder
builder.sendRequest(null, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response
response) {
if (Response.SC_OK == response.getStatusCode()) {
reponse.getText() //can i programmatically invoke a
save or open window prompt?
} else {
Log.debug("some error");
}
}
--
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.