PrimeFaces dataTable: how to catch rows-per-page event?

前端 未结 4 1751
小蘑菇
小蘑菇 2021-01-05 07:03

I cretated a PrimeFaces dataTable:



        
4条回答
  •  生来不讨喜
    2021-01-05 07:53

    I've searched for a solution too and after reading this thread I've found out that there's a new Primefaces feature which allows you to save the state of the datatable.

    So for Primefaces v6.0.10+ you can simply add multiViewState="true".

    Note that this will also save filter, sorting, current page and selection beside rows per page.

    Here's the link to the official demo of this feature: https://www.primefaces.org/showcase/ui/data/datatable/tableState.xhtml

提交回复
热议问题