I’m extending the BeanItemContainer and using it as a container for a table in Vaadin.
public class MyContainer extends BeanItemContainer<MyClass>
implements Serializable {
...
}
The MyClass object has a structure as shown below:
public class MyClass {
private int id;
private InnerClass data;
...
}
And the InnerClass has the structure:
public class InnerClass {
private int propA;
private String propB;
...
}
I’d like to display the id and data.propA columns but I’m not sure how to in Vaadin.
The solution is to use the
addNestedContainerPropertyproperty.Refer to https://vaadin.com/book/-/page/datamodel.container.html for details.