Hey,

why you are trying to do is some kind of deputy for each tree item, right? To 
do so, i needed to change a few things in the code to make it work. But first a 
little tip:  use this.debug to print stuff on the console, also in the 
playground. This prevents you from accepting all these alerts every time you 
test. But now back to the real problem. First, you need to make sure that every 
data object in your model has this "value". One was missing so i added one 
simply by assigning a "x". The second thing is, that you need to tell the 
controller to set up custom bindings. That can be done with the delegate and 
the bindItem method. But still, it is not possible to bind "user data" as you 
printed out in the debug messages. You can only bind properties. But the tree 
item does offer such a property called "model" which can take exactly such a 
deputy. So you have to set up a binding from your models "value" to the "model" 
of the tree item. Doing so, you also have to tell the controller to set up the 
default bindings as well. Sounds like too much information? Just take a look at 
the working code and you will see all i just mentioned:
http://tinyurl.com/334zq65
I hope that helps,
Martin


Am 30.09.2010 um 23:44 schrieb madhead:

> 
> Hello Devs,
> i have the following Scenario:
> http://tinyurl.com/35e3ofy
> 
> How can i bind the value from my data variable, to the TreeItems trough the
> Controller?
> So that i can access this value in my for-loop with
> items[i].getUserData("value");
> 
> Thanks in advance :-)
> -- 
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/bind-value-to-tree-tp5589519p5589519.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to