I'm using a dataTable where one column has the sortBy and the filterBy attributes set and some other columns only use sortBy. The filter also uses the filterOptions, so a drop-down of all possible filters is displayed.
The sorting itself works. The filtering itself also works. However, whenever I used the filter, the sorting does not work any more. Clicking on sorting results in a data table with no data left. The number of rows is still correct, but all String entries are empty and all integer entries are 0. Using the filter once again, the data re-occurs, but disappears as soon as any column is sorted.
Here's my code for the column using sortBy and filterBy:
Code: Select all
<p:column sortBy="#{myBean.city}" filterBy="#{myBean.city}"
filterOptions="#{backingBean.cityOptions}"
filterMatchMode="exact">
<f:facet name="header">
Cities
</f:facet>
<h:outputText value="#{myBean.city}"/>
</p:column>
I'm using PrimeFaces 2.2RC2.
Thanks in advance.