OpenXavaTest - Sellers management
Some code from Seller

Reference as a combo

Showing a reference (@ManyToOne) as a combo is just adding the @DescriptionsList annotation to the member. For example, the reference to SellerLevel from Seller is done in this way:

@DescriptionsList
@ManyToOne(fetch=FetchType.LAZY)
private SellerLevel level;

 

Collection of entities

A collection defined in the standard JPA way (with @OneToMany or @ManyToMany) is enough to obtain a good UI for the collection. Optionally you can use OX annotations to refine some details. For example, in this case we use @ListProperties to indicate the initial list of properties to show in the list (though the final user can add and remove properties):

@ListProperties("number, name, remarks, relationWithSeller, seller.level.description, type")
@OneToMany(mappedBy="seller")
private Collection<Customer> customers;