Reputation: 4052
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.
Upvotes: 1
Views: 2414
Reputation: 4052
The solution is to use the addNestedContainerProperty
property.
Refer to https://vaadin.com/book/-/page/datamodel.container.html for details.
Upvotes: 1