title: Passing view parameter through backing bean
body: <p>I have an inputtext in a page page1.xhtml and I want to pass the value the user will enter into a second page page2.xhmtl as a view parameter using a get method. I use an h:button and put as outcome value from the backing bean but it when I navigate to the second page I the parameter is not passed. What's wrong? Is the value not passed to the backing bean before pressing the button and therefore value cannot be read? Is there another way to do it?</p>
  
  <p>page1.xhtml</p>
  
  <pre><code>h:inputText id="q" value="#{QBean.q}"&gt;&lt;/h:inputText&gt;
  &lt;h:button value="Done" outcome="page2?q=#{indexBean.q}"&gt;
  </code></pre>
  
  <p>page2.xhtml</p>
  
  <pre><code>&lt;f:metadata&gt;
         &lt;f:viewParam name="q" value="#{QBean.q}"/&gt;
  &lt;/f:metadata&gt;
  </code></pre>
  
  <p>QBean</p>
  
  <pre><code>private String q;
  
  //setter
  //getter
  </code></pre>