【问题标题】:how to pass parameters on Primefaces DataTable - Pagination buttons while they get pressed如何在 Primefaces DataTable 上传递参数 - 按下时分页按钮
【发布时间】:2013-12-12 08:43:10
【问题描述】:

Primefaces 有很好的数据表分页,可以与 ajax 一起使用。

http://www.primefaces.org/showcase/ui/datatablePagination.jsf

我想做的是当我按下导航按钮时也将我自己的参数传递给支持 Bean。我该怎么做。

【问题讨论】:

    标签: jsf jsf-2 primefaces


    【解决方案1】:

    在您的数据表的 ajax 侦听器中使用 page 事件:

    <p:dataTable id="yourTable">
       <p:ajax event="page" listener="#{bean.listener(param)"/>
    </p:dataTable>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-19
      • 2018-06-29
      • 1970-01-01
      • 2011-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多