title: Show success message and then redirect to another page after a timeout using PageFlow
body: <p>How can I show a success message and then redirect the user to another page after a timeout of e.g. 5 seconds?</p>
  
  <p>I need this for the login page after a successful login. I tried the following and I can see the warning message on login failure, but not the success message on login success. It shows immediately the target page.</p>
  
  <pre><code>public String check(){
        if (username.equals("test") &amp;&amp; password.equals("test")) {
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample info message", "PrimeFaces rocks!")); 
              return "Success";
          }else{
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN,"Sample warn message", "Watch out for PrimeFaces!"));  
              return "Failure";
          }
      }
  </code></pre>
  
  <p>I'm using Seam's PageFlow for navigation.</p>
  
  <p>I have a </p>
  
  <pre><code>&lt;p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" /&gt;
  </code></pre>
  
  <p>on the login page.</p>