Hi! I am running Primefaces 2.2.RC2 on Mojarra 2.0.3- FCS. I have a problem using both filtering and pagination at the same time. Let me explain the problem using code from the showcase:
<p:dataTable var="car" value="#{tableBean.carsSmall}"
emptyMessage="No cars found with given criteria">
<f:facet name="header">
<p:outputPanel>
<h:outputText value="Search all fields:" />
<h:inputText id="globalFilter" onkeyup="carsTable.filter()" style="width:150px" />
</p:outputPanel>
</f:facet>
<p:column filterBy="#{car.model}"
headerText="Model" footerText="contains"
filterMatchMode="contains">
<h:outputText value="#{car.model}" />
</p:column>
</p:datatable>
This code works absolutely fine. However, if I add pagination, the filtering no longer works. For example:
<p:dataTable var="car" value="#{tableBean.cars}"
paginator="true" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15" emptyMessage="No cars found with given criteria">
<f:facet name="header">
<p:outputPanel>
<h:outputText value="Search all fields:" />
<h:inputText id="globalFilter" onkeyup="carsTable.filter()" style="width:150px" />
</p:outputPanel>
</f:facet>
<p:column filterBy="#{car.model}"
headerText="Model" footerText="contains"
filterMatchMode="contains">
<h:outputText value="#{car.model}" />
</p:column>
</p:datatable>
This code does not work. When I type something into the filter, the paginator changes to only one page, however, the datatable does not rerender and I can't see the filtered results or click on anything on the datatable. By the way, everything works fine on the showcase.
Any help will be appreciated. Thanks!
Datatable Paginator Breaks Filter
-
- Posts: 15
- Joined: 04 Aug 2010, 13:03
Is it a bug in the library?
UPDATE:
When I have typed something into the filter, the Error Console in Firefox displays the folliwing message:
Error: h[e].attributes.getNamedItem("primefacesCallbackParam") is null
Source File: http://localhost:8080/bureauv2new/javax ... &v=2.2.RC2
Line: 1
UPDATE:
When I have typed something into the filter, the Error Console in Firefox displays the folliwing message:
Error: h[e].attributes.getNamedItem("primefacesCallbackParam") is null
Source File: http://localhost:8080/bureauv2new/javax ... &v=2.2.RC2
Line: 1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 30 guests