【发布时间】:2016-10-21 15:27:47
【问题描述】:
我有一个保存按钮,它调用我的支持 Bean 中的一个方法。单击它时,我想显示通知消息,为此我选择了 Primefaces 的 ajaxStatus。 .这是按钮的代码(p:commandButton):
<p:commandButton value="OK"
action="#{myBean.saveRecord}" />
以及它之外的 ajaxStatus:
<p:ajaxStatus onstart="PF('statusDialog').show();"
onsuccess="PF('statusDialog').hide();" />
<p:dialog modal="true" widgetVar="statusDialog"
header="Success operation" draggable="false"
closable="false" resizable="false" style="text-align: center">
</p:dialog>
感谢您的帮助
【问题讨论】:
-
问题出在哪里?
-
如何为所有 xhtml 页面创建通用通知消息以不使用咆哮和消息组件,我会使用与 statusAjax 相同的原理。
-
使用包含并在每个页面中添加这个 AjaxStuts 你怎么看
标签: jsf primefaces jsf-2