Sorting Primefaces 8上的TableState.getMultiSortMeta()

Sorting Primefaces 8上的TableState.getMultiSortMeta(),sorting,primefaces,Sorting,Primefaces,我正在从Primefaces 7版升级到8版。PrimeFaces 8下的表状态模型中不再有getMultiSortMeta()方法。有人知道如何替换以下方法并使其在PrimeFaces 8中工作吗 公共void onSort(sortedvent事件){ 列表排序塔=((数据表) getComponent()).getMultiportMeta(); channelsViewConfig.setmultiportmeta(sortMeta); } 在Primefaces 8中,sortMeta

我正在从Primefaces 7版升级到8版。PrimeFaces 8下的
表状态
模型中不再有
getMultiSortMeta()
方法。有人知道如何替换以下方法并使其在PrimeFaces 8中工作吗

公共void onSort(sortedvent事件){
列表排序塔=((数据表)
getComponent()).getMultiportMeta();
channelsViewConfig.setmultiportmeta(sortMeta);
}

在Primefaces 8中,sortMeta不再是
列表
,而是使用
映射
获取已排序的集合。此集合是通过属性
sortMeta
而不是使用
sortBy
获得的


集合的支持bean getter如下所示:

publicmap getPreSortOrder(){
UIViewRoot viewRoot=FacesContext.getCurrentInstance().getViewRoot();
数据表数据表=(数据表)
findComponent(“resultedtable”);
UIColumn sortColumn=datatable.getColumns().get(0);//Sortby-firstcolumn
字符串sortField=sortColumn.getClientId();//sortField-firstcolumn
SortMeta SortMeta=新SortMeta(sortColumn.getColumnKey(),
sortField,SortOrder.升序,null
);
preSortOrder=新建LinkedHashMap();
put(sortColumn.getColumnKey(),sortMeta);
返回预售订单;
}