#####gwt source code
try {
builder.sendRequest(null, new RequestCallback() {
public void onError(Request request, Throwable
exception) {
displayError("Couldn't retrieve JSON");
}
public void onResponseReceived(Request request,
Response response) {
if (200 == response.getStatusCode()) {
displayError("response:"+response.getText());
updateHome(asArrayOfResponse(response.getText()));
} else {
displayError("Couldn't retrieve
JSON ("
+
response.getStatusText() + ")");
}
}
});
} catch (RequestException e) {
displayError("Couldn't retrieve JSON");
} catch (com.google.gwt.core.client.JavaScriptException jse){
displayError("Couldn't retrieve JSON ("
+ jse.getMessage() + ")");
}
private final native JsArray<HomeData> asArrayOfResponse(String json)
/*-{
return eval(json);
}-*/;
###execption
[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (SyntaxError):
Expected ';'
number: -2146827284
description: Expected ';'
at gwt.coonay.client.Home.asArrayOfResponse(Native Method)
#####the response from the server is :
{"gmail": "m...@gmail"}
please help me find out where the problem is ,thanks so much
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---