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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Data binding in table
Using table I define a datasource with my objects:
BeanItemContainer<Ordini> dataCont = new BeanItemContainer<Ordini>(Ordini.class, ordini);
Ordini contains another object (Articolo) where is the description I want to see in the table but... using
table.setVisibleColumns(new Object[] { "artior", "artiDesc", "colord", "unitaMisura", "qtaord", "qtaspo", "saldo" });
I cannot do in place of "artDesc" the navigation to the object contained in Ordini i.e "articolo.desc".
There are some tips for doing that?
Thanks
Hi, try this:
dataCont.addNestedContainerProperty("articolo.artiDesc");
table.setVisibleColumns(..., "articolo.artiDesc", ...);
Hope that helps.
I've tried your solution but...
Ids must exist in the Container or as a generated column, missing id: articolo.mtDesc
is the response of vaadin.
This is what I do:
BeanItemContainer<Ordini> dataCont = new BeanItemContainer<Ordini>(Ordini.class, ordini);dataCont.addNestedContainerProperty("articolo.mtdesc");dataCont.addNestedContainerProperty("articolo.mtunmi");
......
table.setContainerDataSource(dataCont);.......table.setVisibleColumns(new Object[] { "artior", "articolo.mtDesc", "colord", "articolo.mtunmi", "qtaord", "qtaspo", "saldo" });
Maybe the problem is only a typo: you defined the nested property as articolo.mtdesc but the visible column is articolo.mtDesc (with uppercase d charcter)