I am trying to implement a sorting function on a PrimeFaces dataTable. I have created a list of model objects. We have an issue with sorting order of the table.The sorting column contains integers and string values. When I apply default sort mechanism like sort=#{var.id}
the list was sorting based on ASCII order. Below is the image of the sorting result. I'm currently using PrimeFaces v5.2.5
<p:column headerText="Code Type" sortBy="#{var.codeType}">
<h:outputText value="#{var.codeType}"/>
</p:column>
Can anybody guide me how to overcome this problem.