I am experiencing some peculiarities with sorting columns in a p:dataTable component. I'm wondering if I have coded this incorrectly or whether this is a 2.2.RC2 issue still being resolved.
I have a dataTable (and first column) defined thus:
Code: Select all
<p:dataTable id="RecTbl"
binding="#{countryGridBean.grid}"
rows="#{countryGridBean.filterGridRows}"
paginator="true"
paginatorAlwaysVisible="false"
paginatorPosition="both"
pageLinks="4"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
dynamic="true"
value="#{countryGridBean.recs}" var="txn">
<!-- country code -->
<p:column rendered="#{countryGridBean.colCode}"
sortBy="#{txn.ctryCode}">
<f:facet name="header">
<h:outputText value="Code"/>
</f:facet>
<h:outputText value="#{txn.ctryCode}"/>
</p:column>
<!-- other columns-->
If I add a filterBy attribute to the column as:
Code: Select all
<p:column rendered="#{countryGridBean.colCode}"
sortBy="#{txn.ctryCode}" filterBy="#{txn.ctryCode}">
I've only been using Primefaces for a week, converting some existing code to use the components, so I could easily be missing something critical in the code. I would appreciate knowing what I have coded incorrectly or whether this is a 2.2.RC2 issue still being resolved and therefore I will just wait before implementing sorting.
Thank you for your help.