【发布时间】:2013-07-18 13:24:52
【问题描述】:
我有一个这样的 primefaces 选项卡视图:
<p:tabView id="tabView">
<p:tab id="tab1" title="Godfather Part I">
This tab has static content.
</p:tab>
<p:tab id="tab2" title="Godfather Part II">
this tab has a datatable whose
</p:tab>
</p:tabView>
现在,我想做的是,当用户单击 tab2 时触发 managedbean 方法。我可以在 tabView 的 tabchange 事件上添加一个动作监听器,但这也会在点击 tab1 时触发该方法。如何仅在单击 tab2 时触发方法?
【问题讨论】:
标签: primefaces tabs onclick