Filtering tables

Filtering data is a very useful facility in a table. It allows the user to see only the set of data that matches a certain set of rules (criteria); most commonly, filter by column(s). For example, the user may need to see all players younger than 26 years, which is a filter applied in the column labeled Age.

Basically, a filter can have only visual effect, without modifying the filtered data (using some CSS, JS code, or duplicating the filter results in a separate collection and displaying that collection), or by removing the unnecessary items for the initial collection (which requires restoring its content when the filter is removed).

In JSF, we can write a nice filter by playing with some CSS code, which can be used to hide/show ...

Get Mastering JavaServer Faces 2.2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.