title: primefaces not refreshing the page when using confirmdialog
body: <p>I want to create a menu with a logout link in it.</p>
  
  <p>I used this code:</p>
  
  <pre><code>&lt;p:menubar&gt;
              &lt;p:menuitem value="Logout" oncomplete="confirmation.show()"/&gt;
  
              &lt;f:facet name="options"&gt;
                  &lt;p:inputText style="margin-right:10px" /&gt;
                  &lt;p:commandButton type="button" value="Logout" icon="ui-icon-extlink" /&gt;
              &lt;/f:facet&gt;
  &lt;/p:menubar&gt;
  
  &lt;p:confirmDialog message="Are you sure you want to logout?"
              showEffect="bounce" hideEffect="explode"
              header="Logout" severity="alert"
              widgetVar="confirmation"&gt;
  
              &lt;p:commandButton value="Yes Sure" update="messages"
                  oncomplete="confirmation.hide()"
                  actionListener="#{authBean.logout}"
                   /&gt;
              &lt;p:commandButton value="Not Yet" onclick="confirmation.hide()"
                  type="button" /&gt;
  
  &lt;/p:confirmDialog&gt;
  </code></pre>
  
  <p>Here is my login and logout methods from authBean:</p>
  
  <pre><code>public String login() {
      try{
      UserService userService = new UserService();
      User currentUser = userService.findUser(username, password);
      System.out.println(currentUser);
      if (currentUser != null) {
          HttpSession session = (HttpSession) FacesContext
                  .getCurrentInstance().getExternalContext().getSession(true);
          session.setAttribute("currentUser", currentUser);
          return "index";
      } 
      else return null;
      }
      catch (Exception e) {
          e.printStackTrace();
          FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.toString(), e.toString());
          FacesContext.getCurrentInstance().addMessage(null, message);
          return null;
      }
  
  }
  
  public String logout() {
      HttpSession session = (HttpSession) FacesContext.getCurrentInstance()
              .getExternalContext().getSession(false);
      session.invalidate();
      return "login";
  }
  </code></pre>
  
  <p>Here is my faces-config:</p>
  
  <pre><code>    &lt;navigation-rule&gt;
      &lt;from-view-id&gt;/*&lt;/from-view-id&gt;
      &lt;navigation-case&gt;
          &lt;from-outcome&gt;logout&lt;/from-outcome&gt;
          &lt;to-view-id&gt;/welcome.xhtml&lt;/to-view-id&gt;
          &lt;redirect /&gt;
      &lt;/navigation-case&gt;
      &lt;/navigation-rule&gt;
  </code></pre>
  
  <p>My problem is that when I press Yes on confirm dialog the page doesn't refresh to welcome.xhtml. I have to press on same menu button or any other button so the page updates. I want that it updates to welcome.xhtml after I pressed Yes on confirm dialog.</p>