Hi Chris,
Thanks for that. But I'm actually looking NOT to use json store. I'm looking
to
- fetch json data using ajax request from the server then
- use json marshal to create model
- create a controller and bind model and the UI.
I managed to do the first step. But things are not looking good from step-2.
Here is the slightly modified code
var label = new qx.ui.basic.Label("Default");
this.getRoot().add(label);
var req = new qx.io.remote.Request("http://localhost:6781/json/Test", "GET",
"application/json");
var jsonObj;
req.addListener("completed", function(e){
var jsonObj = e.getContent();
});
req.send();
// create model
var jsonModel = qx.data.marshal.Json.createModel(jsonObj, true);
// create controller
var controller = new qx.data.controller.Object(jsonModel);
controller.setModel(jsonModel);
controller.addTarget(label, "value", "jsonModel.glossary.title");
http://n2.nabble.com/file/n5030517/json_response.txt json_response.txt
But nothing seems to be happening to the label. I have attached the json
response that I receive.
Thanks
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/ajax-request-problem-tp5022288p5030517.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel