【发布时间】:2013-06-22 08:14:24
【问题描述】:
我正在使用 PrimeFaces 投票组件来刷新一些内容。
<h:form id="formBsvtt">
<p:messages autoUpdate="true" showDetail="false" />
<p:outputPanel id="panelOut" layout="block">
...
... content to refresh
...
</p:outputPanel>
<p:panelGrid id="panelIn" layout="block">
...
... various input components with validation
...
</p:panelGrid>
<p:poll widgetVar="poll1" autoStart="true" global="false" interval="15"
partialSubmit="true" process="@this" update="panelOut"
listener="#{myBean.myListener}">
</p:poll>
</h:form>
如您所见,我正在使用 autoUpdate=true 的消息。我的问题是:如果出现验证错误 FacesMessages 将显示,但不迟于 15 秒消失。
是否可以在不设置消息 autoUpdate=false 的情况下阻止民意调查清除 FacesMessages?
我的 Web 应用程序比上面指定的代码 sn-p 大得多,我的意图不是在每种可能的情况下手动更新消息!
【问题讨论】:
-
您更新消息的标准是什么?我认为没有办法阻止
p:poll更新p:messages。我认为process属性可以解决问题,但似乎并非如此。
标签: jsf primefaces polling