You can't display that field specifically, but you could display fields from the entity that the @ManyToOne relates to.
For instance, if you have something like this where ClassA is displayed in some list grid:
Code: Select all
@Entity
public class ClassA {
@ManyToOne(targetEntity=ClassB.class)
@AdminPresentationToOneLookup()
protected ClassB relation;
}
@Entity
public class ClassB {
@AdminPresentation(friendlyName="Class B Property")
public String someProperty;
}
You can annotate ClassA with some @AdminPresentationOverrides to enable showing some of ClassB fields:
Code: Select all
@Entity
@AdminPresentationOverrides({
@AdminPresentationOverride(name="relation.someProperty", value=@AdminPresentation(friendlyName="Class B Property"))
})
public class ClassA {
@ManyToOne(targetEntity=ClassB.class)
@AdminPresentationToOneLookup()
protected ClassB relation;
}