I have method calls included for custom sorting of Strings and numeric types in my Primefaces datatable component. The non-lazy datatables' sortings are working perfectly well in the current situation. But when I switch to lazy-loading, the custom sorting methods aren't called (debugged correctly) although I have the needed load implementation and I can lazy load my data with no flaws. Since my own methods are not being called, sorting errors do occur with PF's own sorting mechanisms. It sorts the data but having troubles with foreign characters of our alphabet, also the numerics are treated like Strings etc.
The question is: How can I make my own sort functions called properly with lazy-loading?
I'm using Primefaces 5.0, JSF 2.2 Mojarra, JDK 1.7, WebLogic server
p.s: off-topic attributes (filters etc.) are omitted.
<p:dataTable id="resourceDataTable" var="result" widgetVar="someWidgetVar"
value="#{someBean.someDataModel.lazyModel}" paginator="true" rowKey="#{result.id}"
rowsPerPageTemplate="5,10,15" rows="5" styleClass="incidentDatatableClass"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
currentPageReportTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
lazy="true" rowSelectMode="checkbox">
<p:column width="7">
<p:selectBooleanCheckbox id="resourceCheckbox" value="#{result.selected}" style="margin-top: 4px;">
<p:ajax listener="#{copResourceBean.resourceDataModel.selectionChanged(result)}" update=":resourceForm:selectedResourcePanel"/>
</p:selectBooleanCheckbox>
</p:column>
<p:column id="resourceName" headerText="#{language['someHeader']}" sortBy="#{result.name}"
sortFunction="#{helper.sortString}">
<h:outputText value="#{result.name}" />
</p:column>
<p:column id="facilityName" sortBy="#{result.facilityName}" sortFunction="#{helper.sortString}" headerText="#{language['someHeader']}" >
<h:outputText value="#{result.facilityName}" />
</p:column>
<p:column id="availableQuantity" headerText="#{language['someHeader']}" width="80" sortBy="#{result.availableQuantity}"
sortFunction="#{helper.sortNumeric}" >
<h:outputText value="#{result.availableQuantity}" />
</p:column>
</p:dataTable>