Richfaces Datatable - Sort specific column on load

泄露秘密 提交于 2019-12-08 10:26:23

问题


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


回答1:


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




回答2:


Just need to add this to options:

"aaSorting": [[ 5, "desc" ]]


来源:https://stackoverflow.com/questions/3787778/richfaces-datatable-sort-specific-column-on-load

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!