title: Navigation in JavaServer Faces, redirecting with correct parameters
body: <p>I have a page: <a href="http://mypage.com/items.jsf" rel="nofollow noreferrer">http://mypage.com/items.jsf</a>.</p>
  
  <p>This page takes the following for granted:</p>
  
  <ul>
  <li>ID is set by GET or ID is set by POST.</li>
  </ul>
  
  <p>Now, I can manually call items.jsf?ID=10</p>
  
  <p>But what I really want to do is have a Button which calls a function that returns the navigation URL.</p>
  
  <pre><code>public String test()
  {
      return "10";
  }
  </code></pre>
  
  <p>Now having the following code in the <a href="http://en.wikipedia.org/wiki/JavaServer_Faces" rel="nofollow noreferrer">JSF</a> file.</p>
  
  <pre><code>    &lt;h:form&gt;
          &lt;h:commandButton action="#{itemsBean.test}" value="Redirect me" /&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>What I want to happen is that when I press "Redirect me", I want a Navigation-Rule to know that I want to go to: items.jsf?ID=<strong><em>10</em></strong></p>
  
  <p>Is this possible? It feels like it's a trivial problem really.</p>