title: How to know if a data table is filtered in Primefaces 5
body: <p>Recently I have moved from JSF 2.0 to JSF 2.2 and Primefaces 3.5 to Primefaces 5</p>
  
  <p>I have got a table which has filter on each column. filtering works well using primefaces 3.5</p>
  
  <pre><code>&lt;p:dataTable  id="gwsReportAllPartListDataTable" 
                                            value="#{viewAllAnalyticsBean.gwsReportPartTwoList}" 
                                            var="report" 
                                            paginator="true" 
                                            rows="100"
                                            paginatorTemplate="{PageLinks} {CurrentPageReport}" 
                                            currentPageReportTemplate="{currentPage} #{dictionary['out_of']} {totalPages}" 
                                            emptyMessage="#{dictionary['nothing_is_here']}" 
                                            scrollable="true"
                                            scrollWidth="1221"
                                            scrollHeight="500"&gt;
  
                                  &lt;p:ajax event="filter"  listener="#{viewAllAnalyticsBean.onFilterDataTable}" oncomplete="updateFilters()"/&gt;
  
                                  &lt;p:column  styleClass="columnCustomClass" style="width: 90px;position:relative; padding-bottom: 30px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['reporting_period']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.year}, #{report.gwsReportPartOne.quarter}"/&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 90px;position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.contractNumber}" filterMatchMode="contains" filterStyle="width:80px; position:absolute; bottom:4px;" filterValue=""&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['subsoil_user_contract_register_number']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.contractNumber}"/&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 40px;position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.gwsType.code}" filterMatchMode="contains" filterStyle="width:30px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['gws_type']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.gwsType.code}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column id="tender_code" width="100" style="position:relative; padding-bottom: 30px;" styleClass="columnCustomClass" filterBy="#{report.skp.code}" filterMatchMode="contains" filterStyle="width:90px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['gws_code_by_skp']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.skp.code}"/&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 150px; position:relative; padding-bottom: 30px;" filterBy="#{report.description}" filterMatchMode="contains" filterStyle="width:140px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['item_name_and_short_description_of_purchased_gws']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.description}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 50px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.tenderType.code}" filterMatchMode="contains" filterStyle="width:40px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['purchase_way']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.tenderType.code}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.agreementNumber}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['agreement_number']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.agreementNumber}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.resultDate}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['tender_result_date']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.resultDate}" &gt;
                                          &lt;f:convertDateTime pattern="dd.MM.yyyy"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.agreementStartDate}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['agreement_conclusion_date']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.agreementStartDate}" &gt;
                                          &lt;f:convertDateTime pattern="dd.MM.yyyy"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.agreementEndDate}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['agreement_deadline_date']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.agreementEndDate}" &gt;
                                          &lt;f:convertDateTime pattern="dd.MM.yyyy"/&gt;
                                      &lt;/h:outputText&gt;                                   
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 50px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.agreementStatus.code}" filterMatchMode="contains" filterStyle="width:40px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['agreement_status']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.agreementStatus.code}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.agreementSum}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['total_sum_of_agreement_without_vat']}, #{viewAllAnalyticsBean.getThTengeOrUsd()}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{viewAllAnalyticsBean.convertValueToCurrentCurrency(report.gwsReportPartOne.agreementSum)}"&gt;
                                          &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.plannedSum}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['planned_sum_in_gpz_without_vat']}, #{viewAllAnalyticsBean.getThTengeOrUsd()}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{viewAllAnalyticsBean.convertValueToCurrentCurrency(report.gwsReportPartOne.plannedSum)}" &gt;
                                          &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.actuallyPaidSum}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['actually_paid_sum_for_report_period_of_agreement_without_vat']}, #{viewAllAnalyticsBean.getThTengeOrUsd()}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{viewAllAnalyticsBean.convertValueToCurrentCurrency(report.gwsReportPartOne.actuallyPaidSum)}" &gt;
                                          &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column  styleClass="columnCustomClass" style="width: 100px; position:relative; padding-bottom: 30px; background-color: #{two.gwsSumWithoutVatColor}" filterBy="#{report.gwsSumWithoutVat}" filterMatchMode="contains" filterStyle="width:90px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['tender_volume_without_vat_in_price']}, #{viewAllAnalyticsBean.getThTengeOrUsd()}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{viewAllAnalyticsBean.convertValueToCurrentCurrency(report.gwsSumWithoutVat)}"&gt;
                                          &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.supplierBinOrIin}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['supplier_bin_iin']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.supplierBinOrIin}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 150px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.supplierName}" filterMatchMode="contains" filterStyle="width:140px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['supplier_gws_name']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.supplierName}" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 60px; position:relative; padding-bottom: 30px;" filterBy="#{report.gwsReportPartOne.supplierCountry.code}" filterMatchMode="contains" filterStyle="width:50px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['supplier_gws_country']}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.gwsReportPartOne.supplierCountry.code}" /&gt;
                                  &lt;/p:column&gt;
  
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.kazcontent}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['local_content_piece']}, %" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{report.kazcontent}" &gt;
                                          &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                      &lt;/h:outputText&gt;
                                      &lt;ui:remove&gt;&lt;h:outputText value="#{report.kazcontentInService}" &gt;
                                              &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                          &lt;/h:outputText&gt;&lt;/ui:remove&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column styleClass="columnCustomClass" style="width: 80px; position:relative; padding-bottom: 30px;" filterBy="#{report.procurementSumOfLocalContentOfGws}" filterMatchMode="contains" filterStyle="width:70px; position:absolute; bottom:4px;"&gt;
                                      &lt;f:facet name="header"&gt;
                                          &lt;h:outputText value="#{dictionary['procurement_sum_of_local_content_of_tru']}, #{viewAllAnalyticsBean.getThTengeOrUsd()}" /&gt;
                                      &lt;/f:facet&gt;
                                      &lt;h:outputText value="#{viewAllAnalyticsBean.convertValueToCurrentCurrency(report.procurementSumOfLocalContentOfGws)}" &gt;
                                          &lt;f:convertNumber pattern="0.00#" locale="ru-RU"/&gt;
                                      &lt;/h:outputText&gt;
                                  &lt;/p:column&gt;
  
                                  &lt;p:columnGroup type="footer"&gt;  
                                      &lt;p:row&gt;  
                                          &lt;p:column footerText="#{dictionary['totals']}: " style="text-align:right"/&gt;  
                                          &lt;p:column footerText="" /&gt;  
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="#{viewAllAnalyticsBean.totalAgreementSum}" /&gt;
                                          &lt;p:column footerText="#{viewAllAnalyticsBean.totalPlannedSum}" /&gt;
                                          &lt;p:column footerText="#{viewAllAnalyticsBean.totalActualPaid}" /&gt;
                                          &lt;p:column footerText="#{viewAllAnalyticsBean.totalGwsSum}" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="" /&gt;
                                          &lt;p:column footerText="#{viewAllAnalyticsBean.averageKazContent} %" /&gt;
                                          &lt;p:column footerText="#{viewAllAnalyticsBean.totalGwsLocalContent}" /&gt;
                                      &lt;/p:row&gt;  
                                  &lt;/p:columnGroup&gt;  
                              &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>I have onFilterDataTable function which fires each time when user start to type to filter fields on each column.</p>
  
  <pre><code>public void onFilterDataTable(AjaxBehaviorEvent event) {
          System.out.println("Filter called");
          DataTable table = (DataTable) event.getSource();
          filteredGwsReportPartTwoList = table.getFilteredValue();
          isFiltered = filteredGwsReportPartTwoList.size() != gwsReportPartTwoList.size();
          countTotalsAndGenerateGwsReportPartOne(isFiltered);
      }
  </code></pre>
  
  <p>but in Primefaces shows me that getFilteredValue() returns null when Primefaces 3.5 returns ready filtered list.</p>
  
  <p>What is the problem? And how to check if data table shows already filtered data on server side?</p>