Datatable Paginator Breaks Filter

UI Components for JSF
Post Reply
someoneyeah
Posts: 15
Joined: 04 Aug 2010, 13:03

17 Jan 2011, 12:49

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!

someoneyeah
Posts: 15
Joined: 04 Aug 2010, 13:03

17 Jan 2011, 15:27

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

someoneyeah
Posts: 15
Joined: 04 Aug 2010, 13:03

18 Jan 2011, 11:44

Anyone, please?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests