1

Here is my "Recapito" entity code:

@Entity @Getter @Setter
public class Recapito extends AceArcId implements Serializable {
    private static final long serialVersionUID = 1L;

    @ManyToOne(fetch=FetchType.LAZY, optional=false)
    private Contatto contatto; 

    @Column(length=254)
    private String email;

    @Column(length=254)
    private String telefono;

    @Column(length=254)
    private String sito;

    @Column(length=254)
    private String paginaSocial;

    @Column()
    private Date data;
}

This screenshot shows how it renders by default:

List properties by default

I'd like to choose what properties of "Contatto" to show in the list view of "Recapito", instead of just the "nome" property.

How do I choose what properties to show in the list view?

javierpaniza
  • 677
  • 4
  • 10

1 Answers1

1

You can use @Tab annotation for that. @Tab allows you to use qualified properties until infinite level:

@Entity @Getter @Setter
@Tab(properties="contatto.nome, contatto.direzione.strada, telefono, email")
public class Recapito extends AceArcId implements Serializable {

Note contatto.nome and contatto.direzione.strada.

Moreover, your user can add any property he wants, including properties from Contatto in Recapito, using the customization options of the list.

Look at this doc to learn more about @Tab: https://openxava.org/OpenXavaDoc/docs/tab_en.html

javierpaniza
  • 677
  • 4
  • 10