mg2 schrieb:
> Hi,
>
> I need to add some custom data to a branch in a treevirtual, using for
> example setUserData("id", 1);
>
> To which object can this Method be applied ? I'm completely got stuck ..
> please help.
> When creating a branch it only returns the id of the brach in the datamodel,
> which is an Integer.
>
> Regards,
> Mike 
>   
Hi,

setUserData works on the main tree object, but not on the nodes. You can 
attach custum properties to nodes without problems.

node=tree.nodeGet(nodeId);
node.myCustomProperty = "foo!";
dataModel = tree.getDataModel();
dataModel.setState( nodeId, node );

(untested code!)

Christian

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to