Richfaces Datatable - Sort specific column on load

2019-06-13 03:09发布

Is it possible to sort a datatable by a specific column when it first loads? Or does it need to be done using the DAO? When I put on ORDER BY in my SQL in my DAO, no data at all is returned in the datatable

标签: jsf richfaces
2条回答
乱世女痞
2楼-- · 2019-06-13 03:53

Just need to add this to options:

"aaSorting": [[ 5, "desc" ]]
查看更多
何必那么认真
3楼-- · 2019-06-13 03:57

Solved it used sortOrder="DESCENDING" or sortOrder="ASCENDING" on the column you wish to have sorted when datatable first loads

查看更多
登录 后发表回答