title: Primefaces Accordion + Datatable filter / Multiple select not working as expected
body: <p>I have a search screen that displays data grouped together based on the search value. This is how the display is accomplished. I have a <code>p:accordionpanel</code> that gets dynamically populated from the back end bean. I have a <code>p:datatable</code> with in the <code>p:accordianpanel</code>. There can be more than one accordion panel that gets displayed each containing a datatable. The display works as expected. </p>
  
  <p><strong>Problem:</strong> I have implemented filter and multiple selection of rows on the  datatables. If there are more than 1 datatable that gets populated, the filter and search only works on the last datatable. The <code>selection</code> and <code>filteredValue</code> attributes of the <code>p:datatable</code> are bound to separate objects. If I click on any of the "Select All" boxes, the rows from the last table gets selected. I would expect the rows on the table that's associated with the "Select All" check box to be selected.</p>
  
  <p>Here's the accordion / datatable:</p>
  
  <pre><code>&lt;p:accordionPanel multiple="true"
                    value="#{basicSearchResultsVO.sortedMessages}" var="sortedMessages"&gt;
      &lt;p:tab title="#{sortedEdiMessages.key}"&gt;
          &lt;p:dataTable id="dataTable"
                       emptyMessage="No Data found with searched criteria"
                       filteredValue="#{sortedMessages.value.filteredMessages}"
                       rowKey="#{message.archiveSequenceI}"
                       rows="10"
                       selection="#{sortedMessages.value.selectedMessages}"
                       sortBy="#{message.msgDateTimeTs}" sortOrder="descending"
                       value="#{sortedMessages.value.messages}" var="message"
                       widgetVar="messagesTable"&gt;
              &lt;f:facet name="header"&gt;
                  &lt;p:outputPanel style="text-align: right;margin:3px;"&gt;
                      &lt;h:outputText value="Search all fields:"/&gt;
                      &lt;p:inputText id="globalFilter" onkeyup="PF('messagesTable').filter()" style="width:150px;" placeholder="Enter keyword"/&gt;
                  &lt;/p:outputPanel&gt;
              &lt;/f:facet&gt;
  
              ...
  
          &lt;/p:dataTable&gt;
      &lt;/p:tab&gt;
  
      ...
  
  &lt;/p:accordionPanel&gt;
  </code></pre>
  
  <p>I am not sure what I am missing. Would appreciate your assistance and feed back. </p>