title: How to get all the selected items in a table?
body: <p>i have a problem with the datatable component. I want to create a datatable with checkbox like a multiple selection example on primefaces showcase. This is the code:</p>
  
  <pre><code>&lt;p:dataTable id="table_cats" value="#{fooBean.catsList}" var="cat" selectionMode="single"   selection="#{fooBean.selectedCatsToDelete}"&gt;
  &lt;p:column selectionMode="multiple"&gt;
      &lt;f:facet name="header"&gt;Remove&lt;/f:facet&gt;
  &lt;/p:column&gt;
  &lt;p:column&gt;
      &lt;f:facet name="header"&gt;Cat Name&lt;/f:facet&gt;
          &lt;h:outputText value="#{cat.name}" /&gt;
      &lt;/p:column&gt;&lt;/p:dataTable&gt;
  </code></pre>
  
  <p>So, the problem is when a select an item. I don't know how to get all the selected items in the table. Can anyone help me with this problem?</p>