According to this: http://java.net/jira/browse/JAVASERVERFACES-2136 flash messages with advanced features must survive redirecting to the page in a different way. I wanted to use something similar in my application, so I uploaded a snapshot of javax.faces-2.1.14-20121003.074348-10 https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.faces/ 2.1.14-SNAPSHOT / for testing.
My situation is this: I have a page (call it test.xhtml) in the root directory, which in the backup bean during the constructor call checks and conditionally sets the message using Omnifaces Message.addFlashGlobalInfo and redirects to index.xthml also in the root directory using Omnifaces Faces.Redirect() (thanks to BalusC!). In index.xhtml I have Primefaces
<p:messages id="msg" showDetail="false" autoUpdate="true" />
I use the same “configuration” described above on other pages, and works fine when redirecting on the same page as the bean method.
So shouldn't the message go through a different redirect path, or have I misunderstood something about this problem? maybe something is wrong here?
Thanks in advance! (I look forward to hearing from BalusC about this btw :))
source share