问题
I have primefaces datatable with live scrolling enabled.The columns are not getting sorted fully.When one of the columns is sorted,for example "insured" in the image shown below, all the records seem to have sorted but when i reach the end of scroll and next set of records get loaded i see other records in unsorted order as indicated in the image ,when i try to see the column in descending order.So because of this i am not getting the sorting feature accurately done(All records are not getting sorted at a single stretch).Also upper case and lower case are sorted separately.
Is it something which is happening due to live scrolling or can we have any work around for this.Please give solution for this as it is one of the important feature that needs to be incorporated in my work.
My JSF code snippet
<p:dataTable id="workSpaceList" var="data"
value="#{workSpaceBean.lazylpId}" widgetVar="multiSelection"
selection="#{workSpaceBean.selectedRows}" resizableColumns="true"
liveScroll="true" scrollRows="15" scrollWidth="100%"
scrollHeight="75%" styleClass=".ui-datatable-hor-scroll"
tableStyle="table-layout:auto;width:100% important!; height:100% important!;padding-left:15px;"
scrollable="true"
filteredValue="#{workSpaceBean.filteredWorkSpaceItems}">
<p:ajax event="rowSelect" listener="#{workSpaceBean.onRowSelect}"
update=":editWrkSp:display" oncomplete="multiDialog.show()" />
<p:column selectionMode="multiple" style="width:5%" />
<p:column headerText="Insured" filterBy="#{data.insuredName}"
sortBy="#{data.insuredName}" style="width:20%">
<h:outputText value="#{data.insuredName}" />
</p:column>
<p:column headerText="City" filterBy="#{data.custAddress_City}"
sortBy="#{data.custAddress_City}">
<h:outputText value="#{data.custAddress_City}" />
</p:column>
.
.
.
.
</p:dataTable>
来源:https://stackoverflow.com/questions/21082940/sorting-not-working-properly-with-primefaces-live-scrolling