Ana*_*oly 2 jsf primefaces jsf-2 primefaces-extensions
我在WAS 8.0.0.10上使用PF 5.1 + PF Extensions 3.0.0 + OmniFaces 1.8.1
尝试从这里
制作以下示例,<pe:triStateCheckbox/>
但是当我更改组件的状态时未调用侦听器,既没有给出错误.
这是我的JSF页面代码:
<pe:triStateCheckbox style="vertical-align:middle;" value="#{bean.notification}">
<p:ajax listener="#{bean.toggleNotification}"/>
</pe:triStateCheckbox>
Run Code Online (Sandbox Code Playgroud)
和豆:
private int notification;
public void toggleNotification() {
System.out.println("toggle");
}
//getters and setters
Run Code Online (Sandbox Code Playgroud)
我可能做错了什么?谢谢.
好吧,展示中的代码与现实世界中的代码不同.去github,我们需要指定事件名称:
<pe:triStateCheckbox id="ajaxTriState" value="#{triStateCheckBoxController.value2}">
<p:ajax event="change"
update="growl"
listener="#{triStateCheckBoxController.addMessage}"/>
</pe:triStateCheckbox>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
588 次 |
最近记录: |