rich:datatable中的默认排序列 [英] Default sort column in rich:datatable

查看:121
本文介绍了rich:datatable中的默认排序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < rich:column sortBy =#{user.uid }> 
...
< rich:column sortBy =#{user.sn}>
...

排序工作正常。但是,当页面加载时,表始终按第1列排序。如何设置默认排序列? (例如,带有user.sn的)

解决方案

我想你必须对基础列表进行排序。默认情况下,表将按照您作为值传递的列表进行排序。


I have rich:dataTable with multiple sortable columns.

<rich:column sortBy="#{user.uid}">
...
<rich:column sortBy="#{user.sn}">
...
etc.

Sorting works fine. However, when page is loaded, table is always sorted by 1st column. How can I set "default" sorting column? (for example, the one with user.sn)

解决方案

I suppose you will have to sort the underlying list. By default the table will be ordered like the list is that you pass as value.

这篇关于rich:datatable中的默认排序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆