Hi Ric, I'm no data binding expert, but I'll try to help.
Riccardo-Maria BIANCHI schrieb: > Hello, > > I'm trying to set up a tree from a JSON file, following the example on > the demobrowser. Just to make sure, you're talking about the data.JsonToTree demo, right? > > But I'm not able to make the tree loading the JSON file. > > If I pass the JSON info from a server call I get the tree status label > stucked on "configured" status. qx.data.store.Json expects a string (the URL of the JSON file), passing in a JSON structure won't work. If you already have a data structure, you can use qx.data.controller.Tree. > > And if I serve a normal JSON txt local file to the tree, I get the > status "completed" by the tree remains empty. > That's weird. If the status is "completed" and there are no exceptions, that means the store was set up correctly. Just to make sure, did you add the listener that opens the tree's root folder to the store's "loaded" event like in the demo? If that's not the problem, could you please post your code so we can take a look at it? > I'm sure I'm missing something very stupid ;-) For example: > > 1) in case of local file: where should I put the file? Is there any > preferred location/folder? I doubt this is the problem, the status would be "aborted" or "failed" if the file wasn't loaded correctly. Still, the preferred way to handle resources is to use qooxdoo's resource management[1]. This ensures that resource URIs are resolved correctly and files are copied when building the deployment version. > > 2) in case of a JSON passed from a server call: is there any > format/setting that I have to set up? See my comment above. > > Thanks for your kind help, > > ....and Merry Christmas Time to all of you!! :-D > > Ric. > Happy Holidays to you, too. :-) Regards, Daniel [1] http://qooxdoo.org/documentation/1.0/ui_resources ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
