title: JSF - Keep Faces Messages after redirect from @PostConstruct
body: <p>I have page1 with button that navigates to page2, page 2 add some messages and navigates back to page1. I want display those messages on page1. I've tried many solutions, but nothing work.</p>
  
  <p>Sample code page1.xhtml:</p>
  
  <pre><code>&lt;p:commandButton value="edit" action="#{bean1.edit}"/&gt;
  </code></pre>
  
  <p>In the managed bean: </p>
  
  <pre><code>public String edit() {
    return "page2?faces-redirect=true";
  }
  </code></pre>
  
  <p>page2 managed bean</p>
  
  <pre><code>@PostConstruct
  private void postConstruct() {
    Faces.getFlash().setKeepMessages(true);
    Messages.addFlashGlobalError("cannot edit!");
    Faces.navigate("page1?faces-redirect=true");
  }
  </code></pre>
  
  <p>Both beans are view scoped and both pages have <code>&lt;p:messages&gt;</code> at the end of body.</p>