I'm passing a simple set of data in JSON format back to GWT. The
class for interpreting this contains the following code:
protected GetProductTree() { }
public final native String getCustomerName() /*-{ return
this.customername; }-*/;
>From what I see, I should simply be able to call this class for my
response like so:
submitProject.addClickListener(new ClickListener() {
public void onClick(Widget w) {
RequestBuilder.Method method=RequestBuilder.GET;
final String url1 =
"http://localhost:8500/getProducts.cfm";
//Window.alert(url1);
RequestBuilder rb = new RequestBuilder(method, url1);
try {
rb.sendRequest(null, new RequestCallback() {
public void onResponseReceived(Request
request, Response
response) {
JSONObject oResults =
(JSONObject) JSONParser.parse
(response.getText());
GetProductTree
oResponse = oResults.isObject
().getJavaScriptObject().cast();
Window.alert(oResponse.getCustomerName());
}
public void onError(Request arg0,
Throwable arg1) {
Window.alert("error");
}
});
} catch (RequestException e) {
}
}
});
But I get a "No source code is available for type ...."
"GetProductTree; did you forget to inherit a required module?"
Any clues to where I'm going wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---