title: How make commandButton not fully refresh page? How to use f:ajax?
body: <p>I have a button to submit a form and invoke a managed bean action.</p>
  
  <pre><code>&lt;h:form&gt;
      ...
      &lt;h:commandButton value="Submit" action="#{bean.submit}" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>But when I press the button it refreshes the whole page and sometimes also changes the URL.</p>
  
  <p>Is there some way to not refresh the page and still invoke the action?</p>