Note that there are some explanatory texts on larger screens.

plurals
  1. POPrimefaces 4.0 - Paginated Data Table Filtering issues
    primarykey
    data
    text
    <p>I built a Relatively simple DataTable and tried to use the filter feature with also using the pagination feature.</p> <p>in reference to the <a href="http://www.primefaces.org/showcase/ui/datatableFiltering.jsf" rel="nofollow">primefaces showcase</a> i created a column for each field in my <code>Customer</code> class.</p> <p>this is my "Controller" Bean:</p> <pre><code>@SessionScoped @Named public class CustomerListController implements Serializable{ public static final long serialVersionUID = //UID; private List&lt;Customer&gt; filteredCustomers; private List&lt;Customer&gt; allCustomers; public CustomerListController(){ //some Class that generates a list of sufficiently many //dummy customers on instantiation this.allCustomers = new CustomerListProducer().getCustomers(); } public List&lt;Customer&gt; getFilteredCustomers{ return this.filteredCustomers; } public void setFilteredCustomers(List&lt;Customers&gt; list){ this.filteredCustomers = list; } public List&lt;Customer&gt; getAllCustomers(){ return this.allCustomers; } } </code></pre> <p>i use following dataTable to render this:</p> <pre><code>&lt;p:dataTable paginator="true" rows="18" scrollRows="15" scrollable="true" scrollHeight="500" var="customer" value="#{customerListController.allCustomers}" scrollable="true" id="customerTable" filteredValue="#{customerListController.filteredCustomers}" widgetVar="table"&gt; &lt;f:facet name="header"&gt; &lt;p:outputPanel&gt; &lt;h:outputText value="Search all fields:" /&gt; &lt;h:inputText id="globalFilter" onkeyup="table.filter()" /&gt; &lt;/p:outputPanel&gt; &lt;/f:facet&gt; &lt;p:Column id="nameColumn" filterBy="name" sortBy="name" headerText="Customer" filterMatchMode="contains"&gt; &lt;h:outputText value="#{customer.name}" /&gt; &lt;/p:Column&gt; &lt;!-- Some more columns in the exactly same manner as this changes only in Customer attribute--&gt; &lt;/p:dataTable&gt; </code></pre> <p>When i press any Key in any given filter field the Table loses all rows and even upon clearing the fields does not display any.</p> <p>When refreshing the page i get the expected amount of rows &amp; pages.</p> <p>I will try to provide amendments as requested.</p> <p><em>EDIT:</em> </p> <p>I am using Primefaces version 4.0.0 as installed with maven.<br> I have been digging into console under FF and found the following:<br> The response XML is empty save the node Entry for updated table. There are no JavaScript errors thrown and the viewstate id sent with the "table data" changes with every keystroke.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload