0
萨拉姆,Primefaces对话框架打开对话框,<p:poll>
我想在一个对话框动态地从一个poll
组件显示通知,但它似乎并没有工作!
<p:poll interval="15" listener="#{notificationBean.showNotification}" />
该动作效果很好,当我用它与commandButton
。
<p:commandButton value="View" icon="ui-icon-extlink" actionListener="#{notificationBean.showNotification}" />
这是我的ActionListener代码:
public void showNotification() {
System.out.println("showNotification");
Map<String,Object> options = new HashMap<String, Object>();
options.put("resizable", false);
RequestContext.getCurrentInstance()
.openDialog("notifications/notify", options, null);
}
我与PF 6.0工作
想不通会发生什么:(
试试这个:'
' 并且让我知道 –它不起作用,它是逻辑的,因为'autostart'属性的默认值是“true”,问题是在我的控制台中我得到'showNotification',对话框不显示! – zez
为什么你需要去后端显示对话框? – raven