File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Primefaces datatable filter event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Primefaces datatable filter event" Watch "Primefaces datatable filter event" New topic

Primefaces datatable filter event

Daniel Adornes

Joined: Jul 18, 2006
Posts: 7
Hi all,

I was using Primefaces 2 and decided to upgrade to version 3.2. It was very nice, except for one big thing! The filterEvent attribute seems to no longer exist.

Before upgrading, I used to code this way:

filterEvent no longer exist and, by what I tested, the component is always considering onKeyUp. But when my application opens a list with thousands of registers it becomes frustrating that each time a caracter is typed on the filter field all the result (and the datatable) is once again rerendered. It would be perfect if the typed information was applied to the search only after the field has lost its focus or with some special key like Enter or Tab.

I've seen a great suggestion but that looked too complex for me:

Something simpler (like was possible in the Primefaces 2) would be much better.

And I need to use the filter that are avaliable in the datatable component because my customer is very concerned with the space that the elements use on the screen, that is, creating a separate panel with filtering field and a "Search" button is not an option.

Thanks in advance!

Daniel Adornes

Daniel Adornes
Sean Coffey

Joined: May 31, 2012
Posts: 1
On the dataTable put the following:


(tested on primeFaces 3.2)
Daniel Adornes

Joined: Jul 18, 2006
Posts: 7
Hi Sean!

Perfect solution and so simple!! Thank you very much!

I agree. Here's the link:
subject: Primefaces datatable filter event
It's not a secret anymore!