Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

TreeTable with HierarchicalContainer - does not work??

Martin Cremer
1 decade ago Jan 11, 2012 2:43pm
Karolina Dobrowolska
1 decade ago Feb 28, 2012 5:17pm
Eric Roberge
1 decade ago Feb 29, 2012 2:05am

Hi Martin,

You just did a little mistake.

When you do this :

Item a = hc.addItem("a");

You add an item to the container and specify that the new item identifier is "a" (not the variable Item a).

So, if you want to create the hierarchy , you simply change your call to the setParent method .

hc.setParent("b", "a");
hc.setParent("c", "b");

Hope it's help.


Last updated on Feb, 29th 2012
Karolina Dobrowolska
1 decade ago Feb 29, 2012 7:44pm


Thank you for the hints! Having to dig deeper into this widget source was very educational for me,

We actually figured out what was wrong with great help from css developers on my team. The css styles v-treetable-treespacer, v-treetable-node-closed etc used by TreeTable were missing from my project, as well as the expand/collapse icon images! Once these were restored, all the controls and the hierarchy are working!

Last updated on Feb, 29th 2012
Robert Mikes
6 years ago Aug 04, 2016 12:56pm