Global faces message not displayed

UI Components for JSF
Post Reply
peterremec
Posts: 19
Joined: 16 Jan 2015, 15:50

25 Sep 2020, 12:01

I'm developing portlets for IBM Websphere Portal 7 using Primefaces library. I came accross this interesting problem when upgrading PF version from 5.3 to 6.2. When using PF 5.3, my footer template looked like this:

Code: Select all

<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>
Message component was automatically updated as expected. But when I upgraded to PF 6.2, I also removed autoUpdate attribute and used <p:autoUpdate/> component:

Code: Select all

<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>
Messages are now NOT updated automatically anymore, I have to explicitly include the component in update attribute.

Does anyone have a similar problem? Am I doing something wrong?

Using Primefaces 6.2.27, MyFaces 2.0.17.

EDIT

I found out that if Java method returns null (It returned something like "/index" before), messages ARE displayed (see viewtopic.php?t=55471). But I still don't know if this is the right way of solving my issue. I'm curious what has changed in PF 6.2 compared to PF 5.3 to cause that issue.
PrimeFaces 6.2 | WebSphere Application Server 8.5 | WebSphere Portal Server 7 | MyFaces 2.0.17

christophs78
Posts: 59
Joined: 01 Mar 2018, 12:29

29 Sep 2020, 19:42

Maybe look into the commit-history of MessagesRenderer: https://github.com/primefaces/primeface ... derer.java

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests