未显示全局头像消息

问题描述

我正在使用Primefaces库为IBM Websphere Portal 7开发portlet。将PF版本从5.3升级到6.2时遇到了这个有趣的问题。使用PF 5.3时,我的页脚模板如下所示:

<ui:composition>
    <div class="ui-fluid">
        <p:outputPanel id="opGlobalMessages">
            <p:messages id="messages" globalOnly="true" closable="false" showIcon="false"
                styleClass="common-global-messages" autoUpdate="true">
            </p:messages>
        </p:outputPanel>
    </div>
</ui:composition>

消息组件已按预期自动更新。但是,当我升级到PF 6.2时,我也删除autoUpdate属性并使用了<p:autoUpdate/>组件:

<ui:composition>
    <div class="ui-fluid">
        <p:outputPanel id="opGlobalMessages">
            <p:messages id="messages" globalOnly="true" closable="false" showIcon="false"
                styleClass="common-global-messages">
                <p:autoUpdate />
            </p:messages>
        </p:outputPanel>
    </div>
</ui:composition>

消息现在不再自动更新,我必须在update属性中明确包含该组件。

有人有类似的问题吗?我在做错什么吗?

编辑

使用Primefaces 6.2,MyFaces 2.0.17。

我发现,如果Java方法返回null(之前返回“ / index”之类的东西),则会显示消息(请参见https://forum.primefaces.org/viewtopic.php?t=55471)。但是我仍然不知道这是否是解决我的问题的正确方法。我很好奇PF 6.2与PF 5.3相比引起了什么问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)