如何将排序顺序设置为默认的 DESC?这种排序除了使 postedAt 成为唯一可排序的项目外什么都不做:
<div id="crudListTable">
#{crud.table fields:['title', 'postedAt'], sort:['postedAt']}
#{crud.custom 'postedAt'}
${object.postedAt.format("dd-MM-yyyy")}
#{/crud.custom}
#{/crud.table}
</div>
最佳答案
如果需要,您可以在实体上执行此操作:
@Entity
public class Course {
...
@ManyToMany
@OrderBy("lastname ASC")
public List<Student> students;
...
}
关于java - Play Framework : Sorting crud table fields,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7512709/