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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.