title: JSF/PrimeFaces selectOneMenu change url parameter and redirect
body: <p>I'm using JSF2 and PrimeFaces. How can I write selectOneMenu that would invoke JSF navigation to redirect user to the same page but with diferent parameters when he change option in menu?
  I only need to change color.</p>
  
  <p>From url:</p>
  
  <pre><code>    &lt;f:metadata&gt;
          &lt;f:viewParam name="vehicle" value="#{myViewController.vehicle}"/&gt;
          &lt;f:viewParam name="vehicle" value="#{myViewController.color}"/&gt;
      &lt;/f:metadata&gt;
  </code></pre>
  
  <p>MyView.xhtml: (no work)</p>
  
  <pre><code>    &lt;h:form id="selectOneMenuEdition"&gt;
      &lt;p:selectOneMenu id="selectOneMenuHeader"
                       value="#{selectOneMenuHeader.outcome}" &gt;
          &lt;f:selectItem itemValue="viewVehicles.xhtml?vehicle=#{myViewController.vehicle}&amp;amp;color=red" itemLabel="Vehicle red " /&gt;
          &lt;f:selectItem itemValue="viewVehicles.xhtml?vehicle=#{myViewController.vehicle}&amp;amp;color=blue" itemLabel="Vehicle blue" /&gt;
          &lt;p:ajax event="change" listener="#{selectOneMenuHeader.navigate}" /&gt;
      &lt;/p:selectOneMenu&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>ManagedBean:</p>
  
  <pre><code>private String outcome;
  
  public void navigate() throws IOException {
      FacesContext.getCurrentInstance().getExternalContext().redirect(outcome);
  }
  </code></pre>