Gaurav Sharma Gaurav Sharma - 1 year ago 85
Java Question

Vaadin: table container has object members

I'm extending the

and using it as a container for a table in Vaadin.

public class MyContainer extends BeanItemContainer<MyClass>
implements Serializable {

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.

Answer Source

The solution is to use the addNestedContainerProperty property.

Refer to for details.