I am creating my first GWT app and have hit a snag. I suspect that the
problem is one things below. I can see in the server logs that the
server returns ok.
This is the method that fails, there is no error ... that I can
see :)
private final native JsArray<BasicComputerInfo> asBasicComputerInfo
(JavaScriptObject jso) /*-{
return json;
}-*/;
I am calling it in the handleJsonResonse method and execution never
makes it to the UpdateDetailPanel Method.
public void handleJsonResponse(JavaScriptObject jso) {
if (jso == null) {
displayError("Couldn't retrieve JSON");
return;
}
updateDetailPanel(asBasicComputerInfo (jso));//<--After the
breakpoint here it never gets to updateDetailPanel
}
This is the response from the server looks like this when I get it
from a browser.
callback0(
{
"LastBootTime": "7/27/2009 8:46:25 AM",
"UserName": "aUser",
"OS": "xp",
"OSVersion": "5.1.2600",
"BuildDate": "5/6/2008 3:18:06 PM",
"RAM": "1063329792",
"HDCapasity": "26000076800",
"HDFree": "7487799296",
"NumProcessors": "1",
"PowerState": "Unknown",
"Site": "NA",
"Office": "NA",
"IPAddress": "NA",
"IPAddress": "Dell Inc.",
"Model": "OptiPlex GX620"
}
);
here is the BasicComputerInfo Class:
public class BasicComputerInfo extends JavaScriptObject {
protected BasicComputerInfo(){}
// JSNI methods to get stock data.
public final native String LastBootTime() /*-{ return
this.LastBootTime; }-*/;
public final native String UserName() /*-{ return this.UserName; }-
*/;
public final native String OS() /*-{ return this.OS; }-*/;
public final native String OSVersion() /*-{ return
this.OSVersion; }-*/;
public final native String BuildDate() /*-{ return
this.BuildDate; }-*/;
public final native int RAM() /*-{ return this.RAM; }-*/;
public final native Long HDCapasity() /*-{ return
this.HDCapasity; }-*/;
public final native Long HDFree() /*-{ return this.HDFree; }-*/;
public final native int NumProcessors() /*-{ return
this.NumProcessors; }-*/;
public final native String PowerState() /*-{ return
this.PowerState; }-*/;
public final native String Site() /*-{ return this.Site; }-*/;
public final native String Office() /*-{ return this.Office; }-*/;
public final native String IPAddress() /*-{ return
this.IPAddress; }-*/;
public final native String Manufacturer() /*-{ return
this.Manufacturer; }-*/;
public final native String Model() /*-{ return this.Model; }-*/;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---