Hi all,
I've been using qx.data.store.Offline for simple lists and have not had a
problem but for some reason I can't seem to get my tree to work.  Here is
the snippet of relevant code:

var url = "json/somedata.json";
                        
if (qx.core.Environment.get("html.storage.local"))
{
        this._store = new qx.data.store.Offline(url, "local");                  
                                        
                        
        if(this._store.getModel() == null)
        {
                var jsonStore = new qx.data.store.Json(url);
                jsonStore.bind("model", this._store, "model");                  
        
        }
}
else
{
        this._store = new qx.data.store.Json(url);                      
}

this._someTree = new
qx.ui.tree.Tree().set({width:350,hideRoot:true,selectionMode:"one"});
this._someController = new qx.data.controller.Tree(null, this._someTree,
"children", "name");                                                    
this._store.bind("model", this._someController, "model");                       
this._someController.setDelegate(treeDelegate);

If I ignore this test "if (qx.core.Environment.get("html.storage.local"))"
by changing it to "if(false)" everything works fine.  If I clear the local
store and try it the first time, it also works.  It only fails to work when
the local store is actually loaded.  It's like the binding never happens and
the tree remains empty.  The local store itself looks correct (as viewed in
Firefox DOM tab).  I also get the same behaviour in FireFox and Chrome.  Any
ideas anyone?
Thanks,
Michael




--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/qx-data-store-Offline-and-qx-ui-tree-Tree-problem-tp7582726.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to