Hey, did you try it in your application of in the playground? I used the playground which is loaded via http and it worked. So maybe you should load you application from a server and give it a try. Additionally, try another borwser sometimes the browsers are very restrictive with loading data.
Best, Martin Am 23.08.2010 um 10:05 schrieb Claus Straube: > Hi Martin, > > thank you for your answer. I've tested your url: > > --snip-- > /* > > ------------------------------------------------------------------------- > Below is your actual application code... > > ------------------------------------------------------------------------- > */ > var url = > "http://demo.qooxdoo.org/devel/demobrowser/demo/data/json/list.json"; > this.debug("setting url --> " + url); > > var jsonStore = new qx.data.store.Json(url); > > this.debug("store --> " + jsonStore); > this.debug("store state --> " + jsonStore.getState()); > this.debug("model --> " + jsonStore.getModel()); > > jsonStore.addListener("loaded", function(e) > { > > this.debug("model has been loaded --> " + e); > // model is created at this point > // and the data of the given event ('e' parameter) > // is the created model > var model = e.getData(); > this.doSomethingWithTheModel(model); > }, this); > }, > > doSomethingWithTheModel: function(model){ > this.debug("method 'doSomethingWithTheModel' called with model --> " + > model); > alert("model loaded --> " + model); > } > --snip-- > > the result was: > > 001144 qx.core.Init: Load runtime: 1144ms > 001155 remote_test.Application[15]: setting url --> > http://demo.qooxdoo.org/devel/demobrowser/demo/data/json/list.json > 001172 remote_test.Application[15]: store --> qx.data.store.Json[40] > 001174 remote_test.Application[15]: store state --> queued > 001175 remote_test.Application[15]: model --> null > 001176 qx.core.Init: Main runtime: 30ms > 001185 qx.core.Init: Finalize runtime: 7ms > 001210 qx.io.remote.Exchange: Unknown status code: 0 (4) > > So it worked not for me with the provided url (status code is here 0 as > well and the json file should be ok...). The code execution seems for me > quite fast for downloading something from the web. Does the json store > block the application while downloading a resource? Any other hints that > I can try to get it running? > > Best regards and thanks in advance - Claus > > > > > Am Montag, den 23.08.2010, 08:54 +0200 schrieb Martin Wittemann: >> Hey, >> >>> --snip-- >>> var url = "http://www.catify.com/demo/json/dummy.json"; >>> var jsonStore = new qx.data.store.Json(url); >>> jsonStore.addListener("loaded", function(e) >>> { >>> // model is created at this point >>> // and the data of the given event ('e' parameter) >>> // is the created model >>> this.doSomethingWithTheModel(e.getData()); >>> }, this); >>> }, >>> >>> doSomethingWithTheModel: function(model){ >>> alert(model); >>> } >>> --snip-- >>> >>> The json document is really simple, too: >>> { >>> foo: "foo", >>> bar: "bar" >>> } >> >> You code seems to work. I tried it in the qooxdoo playground to see whats >> wrong. As i said, the code itself is ok. The problem is the JSON file or the >> status code returned by the server (0) delivering the JSON file. Thats the >> reason out transport layer doesn't do anything with the data. Using foe >> example another URL [1] brings you the desired result. >> >> Regards, >> Martin >> >> [1] http://demo.qooxdoo.org/devel/demobrowser/demo/data/json/list.json > > > -- > claus straube > > phone +49-89-1265-3103 > mobile +49-176-49673717 > skype clausstraube > web http://www.catify.com > office room 1.122, heßstr. 89, 80797 munich > <smime.p7s><ATT00001..txt><ATT00002..txt> ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
