Hi,
I have a datable which works fine when paginating and ordering, but if I use the filter before then paginating or ordering, then no values appear in the table. Do you know if I'm doing something wrong or if this a known issue?
Here's the JSF code:
<p:dataTable id="keypagestable" value="#{keyPageListBean.availableKeyPages}"
var="keyPage" paginator="true" rows="10" selectionMode="single" selection="#{keyPageBean.selectedKeyPage}">
<p:column sortBy="#{keyPage.number}" filterBy="#{keyPage.number}">
<f:facet name="header">
<h:outputText value="Number" />
</f:facet>
<h:outputText value="#{keyPage.number}" />
</p:column>
<p:column sortBy="#{keyPage.label}" filterBy="#{keyPage.label}">
<f:facet name="header">
<h:outputText value="Label" />
</f:facet>
<h:outputText value="#{keyPage.label}" />
</p:column>
<f:facet name="footer">
<p:commandButton value="View" image="ui-icon ui-icon-search"
action="#{keyPageBean.loadKeyPage}"/>
</f:facet>
</p:dataTable>
Note that there are 2 separate backing beans - one for setting the selected keypage and the other for getting a list of them, which are currently both in SessionScope (though I'm considering changing them to ViewScope).
Any information you can offer would be much appreciated.
Datatable filtering and then paginating/ordering
I've found the problem: the keyPage object was not implementing Serializable. Unfortunately, I didn't have the source code to hand, so I wasn't aware that it wasn't doing so.
Interestingly, the KeyPage object is returned from our service layer in JSON format, which may explain why there were no warnings about it not implementing Serializable? A colleague of mine tried the primefaces Car example (http://www.primefaces.org/showcase/ui/d ... omplex.jsf) and got such a warning when his Car object didn't implement Serializable.
Interestingly, the KeyPage object is returned from our service layer in JSON format, which may explain why there were no warnings about it not implementing Serializable? A colleague of mine tried the primefaces Car example (http://www.primefaces.org/showcase/ui/d ... omplex.jsf) and got such a warning when his Car object didn't implement Serializable.
PrimeFaces 2.2.1
JSF 2.0.4-b09
Jetty 7.2.0.RC0
JSF 2.0.4-b09
Jetty 7.2.0.RC0
-
- Information
-
Who is online
Users browsing this forum: No registered users and 16 guests