What happened to the WidgetTree component?

It seems to have vanished?

Is there some other way to build a tree made of other GUI components?

Hi,

Since CUBA 7 uses Vaadin 8, the underlying Tree implementation has changed dramatically. In Vaadin 8, the Tree component is no longer a standalone component, instead, it is a single-column TreeGrid with a specific column renderer that provides expand/collapse functionality. It was impossible to update WidgetsTree to Vaadin 8, as a result, CUBA 7 has no such component.

Regards,
Gleb

Mmm. Okay, is there a good place to start to get the same sort of functionality?

I’m looking to adding a different component as a tree row depending on the data available.

You could try using a DataTreeGrid with a single column and no header, add a generated column with components and ComponentRendere, but in this case, you need to implement a special TreeComponentRenderer, otherwise expand/collapse functionality will be lost.

Right, something like this?

https://demo10.cuba-platform.com/sampler/#main/0/sample?id=datagrid-detailsgenerator

DetailsGenerator isn’t a renderer. It allows to open a special pane with arbitrary layout. Tree supports DetailsGenerator starting from 7.2. As an option, you can try to open all details for all rows when the screen is opened.

Thanks, I’ll play around with it; the DetailsGenerator might do the trick.