Filtering & Sorting
Code: Select all
<p:dataTable var="ds" value="#{transferController.datasetDetail}">
<p:column sortBy="#{ds.sequence}">
<f:facet name="header">
<h:outputText value="Sequence"/>
<f:facet>
<h:outputText value="#{ds.sequence}" />
</p:column>
<p:column sortBy="#{ds.command}" filterBy="#{ds.command}">
<f:facet name="header">
<h:outputText value="Command"/>
</f:facet>
<h:outputText value="#{ds.command}"/>
</p:column>
</p:dataTable>
In DataHelper class decodeSortRequest method
Collections.sort(list, new BeanPropertyComparator(sortColumn, table.getVar(), asc));
The list still has the 2 objects (beans) but the value of the bean's objects are blank.
Which is why the datatable is blank...
(This is using the session scope)