Data binding in table

Using table I define a datasource with my objects:

BeanItemContainer dataCont = new BeanItemContainer(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 dataCont = new BeanItemContainer(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)

My God, you are right!!!
Thanks a lot