我有以下問題: 我想訂購一個DomainObject的列,以獲得最重要的信息,即留下。 爲此,我使用了@MemberOrder
Annotaion,但這不起作用。我有沒有layout.xml
所以沒有選項被覆蓋。Apache ISIS:在一個DomainObject中的列順序 - @MemberOrder不起作用
這裏是我的域對象的一些示例代碼:
@PersistenceCapable(identityType = IdentityType.DATASTORE, table = "jobs")
@Extension(vendorName = "datanucleus", key = "datastore", value = "store-email")
@Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
@DomainObjectLayout(cssClassFa = "envelope")
public class EmailSend implements Comparable {
@PrimaryKey(column = "email_id")
@Persistent(primaryKey = "true", valueStrategy = IdGeneratorStrategy.IDENTITY, column = "email_id")
@Property(editing=Editing.DISABLED)
private int id;
@Property(editing=Editing.DISABLED)
@PropertyLayout(multiLine = 5)
@Column(name = "text", length = 65535)
@Title(sequence = "1")
private String text;
...
@MemberOrder(sequence = "1")
public int getId() {
return id;
}
@MemberOrder(sequence = "2")
public String getText() {
return text;
}
...
}
列的有順序是隨機的,所以沒有@MemberOrder
作品。我的代碼中的錯誤在哪裏?