how to represent Hierarchical data?

Hello there,

I’m wondering if there is a way to represent hierarchical datastructures in Vaadin? Like, you have 2 classes that have 3 rooms each and you wanna show them as a list that user can expand the classes to show the rooms? I did look the documentation and it mentions the Tree and TreeGrid, but those are available only to 8.1 prereleases and I’m using Vaadin 8.0.6 at the moment. I was wondering if it’s even possible to upgrade in middle of the project to the prerelease and is it even wise to use prerelease versions? I’d love to get the Tree component or something similiar that I can get to work in 8.0.6!

I guess another work around would be to fiddle with the original table or grid and somehow modify the css or sass and get certain rows to be inner and make some funky methods to control them, but there must be an easier way to represent such data, right?

What about the TreeTable?

There is documentation for that as well, and it doesn’t even say that it would require 8.1 prerelease, but as far as I’m aware it doesn’t work. It doesn’t suggest vaadin imports in Eclipse when written and the 8.1 changelog mentioned something about it getting replaced by the incoming TreeGrid. I might be doing something wrong ? I’m trying to initialize it like this:

TreeTable ttable = new TreeTable(“My TreeTable”);

As it is documented, but unfortunately nothing. :confused:

And as there is no mention when 8.1 is rolling out, I’m thinking whether or not I should just use something else outside of Vaadin. Java swing has the TreeNode which could potentially solve the issue, but I’m not certain how I would use it with Vaadin elements and with what particular Vaadin element to have the slick theming and looks of Vaadin :confused:

related discussion here: Stack overflow link https://stackoverflow.com/questions/3522454/java-tree-data-structure/17490124#17490124

I really can’t wrap my mind around it, kinda lost here.

We work with 7.7.10 and use TreeTable and GridTree.

That is strange. I tried to set up TreeTable as it says here ( https://vaadin.com/vaadin-documentation-portlet/framework/components/components-treetable.html ) but without a success. Could this be then about the version difference we have? If you look to the vaadin sampler, it doesn’t even contain the TreeTable anymore, only Tree and TreeGrid which both have a warning at the bottom mentioning that they work only in 8.1 prereleases?

In conclusion; it is supported by vaadin 7.x and in vaadin 8 you are stuck to wait the 8.1 for TreeGrid and Tree component?

EDIT: As looking further to it, it really seems so. Source: https://vaadin.com/download/release/8.0/8.0.0/release-notes.html

Where it says the following:
Tree - no replacement in 8.0, planned for 8.1
TreeTable - no replacement in 8.0, TreeGrid planned for 8.1

:frowning:

In this case, we have to wait before we update to Version 8

TreeTable is still in the compatibility package of Vaadin Framework8.
The new TreeGrid and Tree are present in 8.1 (to be released very soon) and can be used in pre-release versions.

How do I gain access to the compatibility package? Kinda made a work around with Accordion element in my project already, but to be honest, the TreeGrid / TreeTabel would be so much better.

TreeGrid does not require compatibility packages. For the old TreeTable and compatibility packages, see e.g.
https://vaadin.com/docs/-/part/framework/migration/migrating-to-vaadin8.html
.