Hello,
I'm using SmartGWT 3.1p 2013/01/02 (LGPL) and the RestDataSource (JSON). The Request contains some GWT-Overlay objects. these are not correctly serialized by SmartGWT. The place where sth. goes wrong is isc.JSONEncoder._serialize
Here is the Code for reproducing it:
The output in the Chrome-Browser is:
Btw. the bug only appears in the client mode in Chrome.
Firefox and hosted mode in Chrome are OK
I'm using SmartGWT 3.1p 2013/01/02 (LGPL) and the RestDataSource (JSON). The Request contains some GWT-Overlay objects. these are not correctly serialized by SmartGWT. The place where sth. goes wrong is isc.JSONEncoder._serialize
Here is the Code for reproducing it:
Code:
private static class Test extends JavaScriptObject{ protected Test() { } public final native void setData(JsArray data)/*-{ this.data = data; }-*/; } public void onModuleLoad() { Test test = (Test) JavaScriptObject.createObject(); JsArray array = (JsArray) JsArray.createArray(); array.push(JavaScriptObject.createObject()); array.push(JavaScriptObject.createObject()); test.setData(array); HTMLPane htmlPane = new HTMLPane(); htmlPane.setContents("<h1>SmartGWT</h1>" + com.smartgwt.client.util.JSON.encode(test) + "</br> " + "<h1>GWT</h1>" + new com.google.gwt.json.client.JSONObject(test).toString()); htmlPane.draw(); }
Code:
Smartgwt { "data":{ "0":{ }, "1":{ } } } GWT {"data":[{},{}]}
Firefox and hosted mode in Chrome are OK
Comment