I migrated from PrimeFaces 6.1 to 10.0.0 and now sortBy of every p:dataTable I have in my project doesn't work.
An example of my p:dataTable:
<p:dataTable widgetVar="truckListTable" id="truckListTable" var="truck" value="#{truckList.trucks}"
sortBy="#{truck.code}" sortMode="single" filteredValue="#{truckList.filteredTrucks}" paginator="true"
paginatorPosition="top" rows="20" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
...
<p:column sortBy="#{truck.plate}" filterBy="#{truck.plate}" filterMatchMode="contains">
<h:outputText value="#{truck.plate}" />
</p:column>
...
</p:dataTable>
I defined truck variable as follow in my bean truckList:
private List<Map> trucks;
public List<Map> getTrucks() {
return trucks;
}
public void setTrucks(List<Map> trucks) {
this.trucks = trucks;
}
My problem is when I click the column header, the table rows are not sorted.
filterBy works fine, but sortBy no. Where am I doing wrong?