File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Primefaces datatable filter event

 
Daniel Adornes
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: http://ovaraksin.blogspot.com.br/2011/04/how-to-filter-pdatatable-on-enter-event.html

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
 
Sean Coffey
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the dataTable put the following:

filterEvent="enter"

(tested on primeFaces 3.2)
 
Daniel Adornes
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sean!

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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic