title: jsf - Get rid of "double click" in checkbox (PrimeFaces' selectManyCheckbox) to display values
body: <p>There's a checkbox inside a form that needs to be double-clicked for values to be passed to the bean. I suppose there's a double submit, but don't know how to get rid of it.</p>
  
  <p>Code right now:</p>
  
  <pre><code>&lt;p:selectManyCheckbox id="displayBy" style="font-size: 12px" value="#{detailedDashboardMB.displayBy}" valueChangeListener="#{detailedDashboardMB.onDisplayByClick}" columns="6" layout="grid"&gt;
      &lt;f:ajax render=":messages:growl detailed-chart" /&gt;
      &lt;f:selectItem itemLabel="Weekday" itemValue="Weekday" /&gt;
  &lt;/p:selectManyCheckbox&gt;
  </code></pre>
  
  <p>Event method:</p>
  
  <pre><code>public void onDisplayByClick() {
      jsfUtils.messages("INFO", "Selected:", this.displayBy.toString());
  }
  </code></pre>
  
  <p>First click (selecting the option) displays:</p>
  
  <blockquote>
    <p>Selected:
    []</p>
  </blockquote>
  
  <p>Second click (unselecting the option) displays:</p>
  
  <blockquote>
    <p>Selected:
    [Weekday]</p>
  </blockquote>