title: select all p:selectManyCheckbox
body: <p>I'd like to create a button to select all checkboxes but I couldn't find one example that works for me. I'm using primefaces.</p>
  
  <pre><code>     &lt;p:selectManyCheckbox widgetVar="sex" id="sexta" value="#{solicitacaoAcompanhamentoMB.selectedHorariosSexta}" layout="pageDirection"&gt;  
          &lt;f:selectItem itemLabel="12:00" itemValue="Sexta-12:00" /&gt;  
          &lt;f:selectItem itemLabel="12:30" itemValue="Sexta-12:30" /&gt; 
          &lt;f:selectItem itemLabel="13:00" itemValue="Sexta-13:00" /&gt; 
          &lt;f:selectItem itemLabel="13:30" itemValue="Sexta-13:30" /&gt; 
          &lt;f:selectItem itemLabel="14:00" itemValue="Sexta-14:00" /&gt;  
          &lt;f:selectItem itemLabel="14:30" itemValue="Sexta-14:30" /&gt; 
          &lt;f:selectItem itemLabel="15:00" itemValue="Sexta-15:00" /&gt;  
          &lt;f:selectItem itemLabel="16:00" itemValue="Sexta-16:00" /&gt;  
          &lt;f:selectItem itemLabel="16:30" itemValue="Sexta-16:30" /&gt;
          &lt;f:selectItem itemLabel="17:00" itemValue="Sexta-17:00" /&gt;  
          &lt;f:selectItem itemLabel="17:30" itemValue="Sexta-17:30" /&gt; 
          &lt;f:selectItem itemLabel="18:00" itemValue="Sexta-18:00" /&gt;  
          &lt;f:selectItem itemLabel="18:30" itemValue="Sexta-18:30" /&gt; 
          &lt;f:selectItem itemLabel="19:00" itemValue="Sexta-19:00" /&gt;  
          &lt;f:selectItem itemLabel="19:30" itemValue="Sexta-19:30" /&gt; 
          &lt;f:selectItem itemLabel="20:00" itemValue="Sexta-20:00" /&gt;  
          &lt;f:selectItem itemLabel="20:30" itemValue="Sexta-20:30" /&gt; 
          &lt;f:selectItem itemLabel="21:00" itemValue="Sexta-21:00" /&gt;  
          &lt;f:selectItem itemLabel="21:30" itemValue="Sexta-21:30" /&gt; 
          &lt;f:selectItem itemLabel="22:00" itemValue="Sexta-22:00" /&gt;  
          &lt;f:selectItem itemLabel="22:30" itemValue="Sexta-22:30" /&gt; 
       &lt;/p:selectManyCheckbox&gt;
  </code></pre>