title: primefaces datatable mutiple selection checkbox: checking at least one item is selected
body: <p>I have a primefaces datatable with multiple checkbox selection and I can't find a way to check if there is at least one item selected using postValidate event</p>
  
  <p>xhtml   </p>
  
  <pre><code>&lt;p:dataTable
          var="item"
          value="#{myBean.list}"
          selection="#{myBean.selectedItems}"&gt;
          &lt;p:column selectionMode="multiple" /&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;
              &lt;h:outputText value="Item" /&gt;
              &lt;/f:facet&gt;
                  &lt;h:outputText value="#{item.value}" /&gt;
          &lt;/p:column&gt;                 
          &lt;f:event listener="#{myBean.isSelectedItem}" type="postValidate" /&gt;     
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>My Bean</p>
  
  <pre><code> public void isSelectedItem(ComponentSystemEvent event) {
              HtmlDataTable table = (HtmlDataTable) event.getComponent();
              //no idea how to get checkboxes inside datatable
      }
  </code></pre>
  
  <p>How can I get elements inside datatable ?</p>