HierarchicalBeanItemContainer with 1:m relation

Hello,

I am new to vaadin and trying to implement a tree structure using java beans.
I have 2 bean classes A and B

class B
{ String name;
// getter and setter }

class A
{ String name;
List children;
//getters and setters}

How can I implement bean A in Tree structure with B as children?

I tried the following method but could get only roots.

List items = o.getA();
final BeanItemContainer
beans = new BeanItemContainer(A.class);
beans.addAll(items );
tree.setContainerDataSource(beans);

BeanItemContainer.addNestedContainerProperty(“children.property”) is not
available for bean properties of type List.

Any help appreciated!