So, I have found a solution to the problem regarding different context menues on different types of items.
Now I only use one contextmenu, that is built when the contextmenu event is emitted on the tree item. Then I have access to the model data and can make every context menu unique if I would want to. It seems like a smart way of solving the problem, and more efficient than to store a context menu on all items in the tree. Any comments on this? I'm still wondering on how to select the right item and expand the tree there, but I guess a first version could jut be to loop over all items and check if it should be selected. I have a new question, about filtering the data that should be visible in the tree when the data is loaded. If the web service gives more data than should be viewable. But I'll open a new conversation about that topic. I have updated the code if anyone is interested: http://tinyurl.com/qhht7ua Regards, Fredrik -- View this message in context: http://qooxdoo.678.n2.nabble.com/Using-model-data-in-tree-to-create-context-menu-etc-tp7584277p7584281.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
