Dear qooxdoo users,
I would like to react to changes in the selection of a qx.ui.tree.VirtualTree
by binding the tree's selection property to another property of another class:
tree.bind("selection",this,"selection");
Unfortunately this.applySelection() is never called when I select different
entries of the tree. What am I doing wrong? See below for the complete
standalone example.
I would also like to use the Tree Controller together with VirtualTree. But it
seems only to be compatible with qx.ui.tree.Tree, or can you show me an example
how to make the Tree Controller work with a VirtualTree?
Regards,
Jenny
code demonstrating the VirtualTree selection binding problem:
qx.Class.define("tree.Application",{
extend : qx.application.Standalone,
properties:{
selection:{
init: null,
apply: "applySelection",
event: "changeSelection"
}
},
members: {
applySelection: function(value){ //never called. why?
alert("applySelection: "+value)
},
main: function(){
this.base(arguments);
var tree=this.createTree();
tree.bind("selection",this,"selection");
},
createTree: function(){
// initializes layout
var container = new qx.ui.container.Composite(new
qx.ui.layout.HBox(20));
this.getRoot().add(container, {top: 20, left: 20});
// creates the tree
var tree = new qx.ui.tree.VirtualTree(null, "name",
"children").set({
width : 200,
height : 400
});
container.add(tree);
data={name:"Root",children:[{name:"Child",children:[]}]};
var model = qx.data.marshal.Json.createModel(data,
true);
tree.setModel(model);
return tree;
}
}
});
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel