Hello,
I'm a bit stuck and I really need some help here.
I'm working on a Tree that can be loaded progressively on deploy and
selection events. I also would like using the new binding features with that
tree (namely the Tree Controller and the Json Store).
The problem is I don't know how to manage the bindings correctly.
In the first step (first launch), I bind the store with the tree controller.
Then, the behaviour changes. The store should be binded to the tree
controller "selection[0]". I really don't know how to do this in a simple
way.
If it's not possible ... never mind (I'll use the default tree behaviours
and functions). But It would be useful and cool.
Here's a code example:
this.tree.controller = new qx.data.controller.Tree(null, this.browser.tree,
"kids", "name");
this.store = new qx.data.store.Json();
this.tree.bindId = store.bind('model.tree',this.tree.controller,'model');
this.store.addListener("loaded", function(ev)
{
// first loading
if (this.tree.bindId)
{
this.store.removeBinding(this.tree.bindId);
this.tree.bindId=null;
var root = this.tree.getRoot();
if (root)
{
this.tree.addToSelection(root);
root.setOpen(true);
}
}
else
{
this.store.bind('model.tree.kids',this.tree.controller,
'selection[0].kids')); // this would'nt work
}
}, this.browser);
Furthermore, I'd like to know how I can complete/populate a partial zone of
a model in the tree controller by new additional datas without resetting it
completely... Any Ideas ?
Thanks in advance,
Best,
BenoƮt.
--
View this message in context:
http://www.nabble.com/Progressive-Tree-on-selection-and-or-deployement-%2B-the-new-binding-features-tp24645160p24645160.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel