Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Can a Tree Grid model an Entity with Embedded Objects?

    I would like to create a TreeGrid to model the structure on my entity, and I am curious if this capability is currently supported?

    Code:
    @Entity
    public class Person {
         @Id
         @GeneratedValue
         private long id;
    
         @Embedded
         private Name name;
    
         @ElementCollection
         @CollectionTable
         Set<Phone> phones;
    
         @ElementCollection
         @CollectionTable
         Set<Address> addresses;
    }
    Is it possible to setup a TreeGrid such that I could see a List of Person Objects that then has the Embedded Objects as child nodes? All of the examples appear to assume that child records are identical to the parent record in structure.

    #2
    Directly using this bean structure would require having tree.childrenProperty be different at each level of the tree, which Tree does not currently support.

    This just means you need a data transform somewhere in the process (DMI, DataSource.transformResponse, etc) that makes your bean structure into a uniform structure that uses consistent property names at each level.

    Comment

    Working...
    X