OpenXavaTest - Products management

 Loading...

Some code from Product Some code from Product

Dependent combos

In order that the combo elements depend on the value of another property (combo or not) is only needed to add some attributes to the @DescriptionsList annotation. In this way:

@ManyToOne(optional=false, fetch=FetchType.LAZY)
@DescriptionsList(depends="family", condition="${family.number} = ?")
private Subfamily subfamily;

When the family changes the subfamily combo is refilled. Try it in the above portlet.

Image gallery

Add a image gallery to an entity is as easy as add the next code:

@Stereotype("IMAGES_GALLERY")
private String photos;