Hi,
I'm currently using SmartGWT 2.5 LGPL.
I have modified the JSON String a little bit and now it looks like...
i've tried stuff like
i also tried to map the data to a DataSourceTextField via setValueXPath but that also didn't work i just wanna get this ("table":{"column":[{"validator":["justsomevalidstuff2.1"],"valuemap":["valuemap2"],"name":"somename"},{"validator":["justsomevalidstuff2.2"],"valuemap":["valuemap2"],"name":"somename2"},{"validator":["justsomevalidstuff2.3"],"valuemap":["valuemap2"],"name":"somename3"}],"name":"SomeGridName"}}}) line out of the JSON String.
Some additional info... The data is sent via a RestDataSource to the Client.
Anybody got an idea how to get this data out of the JSON String?
I'm currently using SmartGWT 2.5 LGPL.
I have modified the JSON String a little bit and now it looks like...
Code:
{"response": {"data":[{ ~~ some data ~~}], "endRow":15,"startRow":0,"status":0,"totalRows":15, "table":{"column":[{"validator":["justsomevalidstuff2.1"],"valuemap":["valuemap2"],"name":"somename"},{"validator":["justsomevalidstuff2.2"],"valuemap":["valuemap2"],"name":"somename2"},{"validator":["justsomevalidstuff2.3"],"valuemap":["valuemap2"],"name":"somename3"}],"name":"CircuitMgwGrid2"}}}
Code:
grid.addDataArrivedHandler(new DataArrivedHandler() { public void onDataArrived(DataArrivedEvent event) { SC.Say(((CustomGrid) grid).getds().getAttribute("table"))); // or grid.getDataSource().getAttribute("table"); or sth else } });
Some additional info... The data is sent via a RestDataSource to the Client.
Anybody got an idea how to get this data out of the JSON String?