title: How to submit JSF PrimeFaces form with selectBooleanCheckbox without refreshing the page?
body: <p>I'm using JSF with PrimeFaces to make an application as an assignment for college. I'm struggling to get something working. I'm using PrimeFaces and I have a tabview which contains 5 tabs. In one of those tabs I have a dataTable which has several rows and columns. This all works fine, but the problem is that I want to submit the form without rerendering the (entire page). The thing is, every column in the dataTable has a selectBooleanCheckbox, and when that checkbox is selected, a button should disappear. If it's unselected the button should appear. This works fine with onchange="this.form.submit()" or onclick="this.form.submit()" but it refreshes the entire application, and it causes the first tab to be selected, rather than the one I was at. So I'm looking for a solution to be able to submit and re-render some stuff without refreshing the entire program. This is my code: </p>
  
  <pre><code>&lt;body&gt;
      &lt;h:form id="customerForm"&gt;
          &lt;p:dataTable id="customerlist" var="c" value="#{customerBean.customerList}"&gt;
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;Select&lt;/f:facet&gt;
                  &lt;center&gt;
                      &lt;p:selectBooleanCheckbox value="#{c.selected}" onchange="this.form.submit()"/&gt;
                  &lt;/center&gt;
              &lt;/p:column&gt;
          &lt;/p:dataTable&gt;
          &lt;h:commandButton id="testtest" value="test" rendered="#{customerBean.numberSelected() == 0}"/&gt;
      &lt;/h:form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I removed most of the columns for the sake of simplicity. What is the solution to this? I've tried using ajax, but that didn't work </p>
  
  <pre><code>&lt;p:selectBooleanCheckbox value="#{c.selected}"&gt;
      &lt;f:ajax event="click" execute="@form" render="@none"/&gt;
  &lt;/p:selectBooleanCheckbox&gt;
  </code></pre>