Hello Everyone,
I'm trying to read in a JSON data file to populate a ComboBox. The only example
that I've been able to find is on pages 110-111 of the Qooxdoo book.
Here is what I've put together so far:
// get data
var url = "store/data.json";
var store = new qx.data.store.Json(url);
var model = store.getModel();
console.log("store --> " + store);
console.log("store state --> " + store.getState());
console.log("store.getModel() --> " + store.getModel());
console.log("model --> " + model);
new qx.data.controller.List(model, callTypeCombo);
Here is the output from Firefox using the Firebug plugin:
[07:59:56.343] GET http://localhost/openemergency/ [HTTP/1.1 304 Not Modified
2ms]
[07:59:56.727] GET http://localhost/openemergency/script/openemergency.js
[HTTP/1.1 304 Not Modified 1ms]
[07:59:57.116] openemergency.view.PatientChiefComplaintView begin @
http://localhost/openemergency/script/openemergency.js:13155
[07:59:57.151] store --> qx.data.store.Json[151-0] @
http://localhost/openemergency/script/openemergency.js:13187
[07:59:57.158] store state --> sending @
http://localhost/openemergency/script/openemergency.js:13188
[07:59:57.163] store.getModel() --> null @
http://localhost/openemergency/script/openemergency.js:13189
[07:59:57.169] model --> null @
http://localhost/openemergency/script/openemergency.js:13190
[07:59:57.176] openemergency.view.PatientChiefComplaintView end @
http://localhost/openemergency/script/openemergency.js:13192
[07:59:59.249] Error in parsing value for 'background-image'. Declaration
dropped. @ http://localhost/openemergency/
[07:59:59.263] Unknown property 'auto-complete'. Declaration dropped. @
http://localhost/openemergency/
[07:59:59.278] GET http://localhost/openemergency/store/data.json [HTTP/1.1 200
OK 1ms]
[07:59:59.292] GET
http://localhost/openemergency/resource/qx/decoration/Modern/arrows-combined.png
[HTTP/1.1 304 Not Modified 1ms]
[07:59:59.304] GET
http://localhost/openemergency/resource/qx/decoration/Modern/scrollbar-combined.png
[HTTP/1.1 304 Not Modified 2ms]
[07:59:59.321] JSON.parse: expected property name or '}' @
http://localhost/openemergency/script/openemergency.js:15350
As you can see, there is no mention of any data, and I have no idea where that
error of JSON.parse is coming from.
Here is the output running the same program through Chrome using the Firebug
Lite plugin:
openemergency.view.PatientChiefComplaintView begin
GET store/data.json
HeadersResponseJSON
{
s: "A",
s: "B",
s: "C",
s: "D",
s: "E"
}
store --> qx.data.store.Json[151-0]
store state --> sending
store.getModel() --> null
model --> null
openemergency.view.PatientChiefComplaintView end
As you can see, there is no JSON error and I can see the data file has been
read in, and nothing has been put into the ComboBox. So I'm obviously missing
some connection.
I've tried many different variations, including attempting to do service and
data different bindings, all without success, so I distilled my example down to
the simplest form.
Any ideas or suggestions would be great!
Thank You for your time and attention!
Harlan...
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel