SmartGwt - Load Grid Data From JSON -


i trying started smartgwt. using xjsondatasource make cross-domain call example page @ smartclient has json data. when run code, however, popup comes says "finding records match criteria..." never goes away, , data not loaded. using free version of smartgwt (my company has said we'll use). hoping i'm missing obvious.

    datasource datasource = new xjsondatasource();     datasource.setdatatransport(rpctransport.scriptinclude);     datasource.setdataformat(dsdataformat.json);      datasource.setdataurl("http://www.smartclient.com/smartgwt/showcase/data/dataintegration/json/contactsdata.js");     datasourcetextfield namefield = new datasourcetextfield("name", "name");      namefield.setvaluexpath("name");      datasource.setfields(namefield);      listgrid grid = new listgrid();     grid.setdatasource(datasource);     grid.setwidth100();     grid.setheight(100);     grid.setautofetchdata(true);     grid.draw(); 

i see docs here: http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/data/xjsondatasource.html

note, indicated in tutorial above, server responsible writing out not data, javascript function call tells client response has arrived. client passes name of function call "callback" url parameter.

but there no such callback in code @ page link @ www.smartclient.com/smartgwt/showcase/data/dataintegration/json/contactsdata.js


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -