Hi,

would you please open a bug for that issue? Here is a playground example to 
demonstrate the issue: http://tinyurl.com/lfongsb


Gruß
Mustafa Sak

Applications & Integration

1&1 Internet AG
Ernst-Frey-Straße 10
DE-76135 Karlsruhe


-----Ursprüngliche Nachricht-----
Von: marcounet [mailto:marcleb...@skynet.be] 
Gesendet: Mittwoch, 6. August 2014 09:29
An: qooxdoo-devel@lists.sourceforge.net
Betreff: [qooxdoo-devel] VirtualTree: hideRoot and invisible children

Hi,
I have a *qx.ui.tree.VirtualTree* widget whose *hideRoot* property is set to 
true.

- When I click on a button, I add a child to the selected item, it works 
without problem.

- When I click on another button, I add a child to the root item of the tree. 
But in this case, the new child does not appear.

If I set the *hideRoot* property to false, the new child appears immediately.
I solved this problem by setting hideRoot to false before adding the child, 
then setting hideRoot to true again.
It seems to work perfectly (you don't even see the root item appear) but I'm 
wondering if this is the right way to do it.

Here's the code when I add a child to the selected item:
----------
var newNode = { id: 0, title: 'New Item', children: [] }; var selectedItem = 
tree.getSelection().getItem(0); 
selectedItem.getChildren().push(qx.data.marshal.Json.createModel(newNode,
true));
----------

And here's the code when I add a child to the root item:
----------
var newNode = { id: 0, title: 'New Item', children: [] };
*tree.setHideRoot(false);*
var treeModel = tree.getModel();
treeModel.getChildren().push(qx.data.marshal.Json.createModel(newNode,
true));
*tree.setHideRoot(true);*
----------

Am I doing something wrong ?

Many thanks for your help :-)
Marc



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/VirtualTree-hideRoot-and-invisible-children-tp7586040.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to