title: PrimeFaces navigation using MenuItem
body: <p>I have a PrimeFaces 3.4 Menubar like this:</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p:menubar&gt;
          &lt;p:submenu label="File"&gt;
              &lt;p:submenu label="New"&gt;
                  &lt;p:menuitem value="Go" id="page1LinkID" action="#{navBean.goNav}"&gt;     
                      &lt;f:param id="page1ParamID" name="pageViewID" value="Page1"/&gt;
                  &lt;/p:menuitem&gt;
                  &lt;p:menuitem value="Other" url="#"/&gt;
              &lt;/p:submenu&gt;
          &lt;/p:submenu&gt;
      &lt;/p:menubar&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>the backing bean is like this</p>
  
  <pre><code>@ManagedBean
  @RequestScoped
  public class navBean {
  
  /**
   * Creates a new instance of navBean
   */
  private String includedPage = "contentMain.xhtml";
  public navBean() {
  }
  public String getPage(){
      return includedPage;
  }
  public void setPageName(){
      this.includedPage = includedPage;
  }
  
  public String goNav() {
     FacesContext context = FacesContext.getCurrentInstance();
     String selectedPageViewId = context.getExternalContext().getRequestParameterMap().get("pageViewId");
     if (selectedPageViewId.equalsIgnoreCase("page1")){
          includedPage = "test.xhtml";
      }
  }   
  </code></pre>
  
  <p>Problem is it does not work, no exceptions nothing. I originally tried putting the action into  like this...
  Changing goNav to void...nothing.</p>
  
  <p>Any Ideas?
  Thanks In Advance
  Rick</p>