The default collation column in rich: datatable

I have a rich one: dataTable with multiple sortable columns.

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

Sorting works great. However, when the page loads, the table is always sorted by the 1st column. How can I set the default sort column? (e.g. with user.sn)

+5
source share
3 answers

I assume that you will have to sort the main list. By default, the table will be ordered, like the list that you pass as a value.

0
source

The column sort order is determined by the sortOrder property: NONE, ASCENDING, or DESCENDING.

NONE - ( ). .

, sortOrder , e. .

<rich:column sortBy="#{user.sn}" sortOrder="ASCENDING">

rich: dataTable, rich: scrollableDataTable rich: extendedDataTable.

+14

, rich:dataTable. , ( ) rich:extendedDataTable. tableState , . :

{
"columnsVisibility":{"cCountry":"1","cProject":"1","cStatus":"1","cNumber":"1"},
"columnGroupingState":{"order":"ASCENDING","columnId":"cStatus"},
"columnsSizeState":{"cCountry":"98","cProject":"242","cStatus":"80","cNumber":"55"},
"columnsOrder":["cCountry","cProject","cNumber","cStatus"]
}
+1

All Articles