OpenXavaTest - Sellers management
  control alt P - Generate a PDF report with displayed data in list control alt X - Generate a Excel report with displayed data in list control N - Create a new entity control D - Delete the selected objects   Detail - List - Both  
 - Customize
Number 
Name 
F7 - Detail mode  - Delete record
JUAN HERRERO 
1/2 
2W 
F7 - Detail mode  - Delete record
TEST 
6666 
F7 - Detail mode  - Delete record
13 
HAPH 
SENIOR 
1   rows per page There are 3 records in list ( Hide them)
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;