title: filter in p:datatable does not filter instead shows nothing
body: <p>In an attempt to work on the dynamic list and dynamic html, I have built a dynamic table with dynamic columns in the data table, all is working fine and works as required except it does not filter instead it shows no record as some text is typed. ..................................</p>
  
  <pre><code>@ManagedBean(name="liveRangeService", eager = true)
  @ApplicationScoped
  
  public class LiveRangeService implements Serializable {
  
      ResultSet RS;
      dbConnectionSQLServer db;
  
      private List&lt; Map&lt;String, ColumnModel&gt; &gt; tableData;
      private Map&lt;String, ColumnModel&gt; selectedData;
      private List&lt; Map&lt;String, ColumnModel&gt; &gt; filteredData;
  
      public Map&lt;String, ColumnModel&gt; getSelectedData() {
          return selectedData;
      }
  
      public void setSelectedData(Map&lt;String, ColumnModel&gt; selectedData) {
          this.selectedData = selectedData;
      }
      private List&lt;ColumnModel&gt; tableHeaderNames;
      private String tableColWidths;
      private List&lt; Map&lt;String, ColumnModel&gt; &gt; selectedRow;
  
      public List&lt;Map&lt;String, ColumnModel&gt;&gt; getTableData() {
          return tableData;
      }
      public List&lt;ColumnModel&gt; getTableHeaderNames() {
          return tableHeaderNames;
      }
  
      public LiveRangeService() {
      }
  
      public void LiveRangeServicesss() {
          db = new dbConnectionSQLServer();
          try {
              tableData = new ArrayList&lt; Map&lt;String, ColumnModel&gt; &gt;();
              tableHeaderNames = new ArrayList&lt;ColumnModel&gt;();
  
              Statement SQL = dbConnectionSQLServer.getCN().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
  
              RS = SQL.executeQuery("Select * From Coa32 Order BY Title");
  
              for (int j = 0; j &lt; RS.getMetaData().getColumnCount(); j++) {
                  tableHeaderNames.add(new ColumnModel("header "+j, RS.getMetaData().getColumnLabel(j+1)));
              }
  
              //Generate table data.
              for (int i = 0; RS.next(); i++) {
                  Map&lt;String, ColumnModel&gt; playlist = new HashMap&lt;String, ColumnModel&gt;();
  //                System.out.println("Row : " + i );
                  for (int j = 0; j &lt; RS.getMetaData().getColumnCount(); j++) {
                      playlist.put(tableHeaderNames.get(j).key, new ColumnModel(tableHeaderNames.get(j).key, RS.getString(j+1)));
                  }
                  tableData.add(playlist);
              }
              PrimeFaces.current().ajax().update("form:dlgTBL");
              PrimeFaces.current().ajax().update("form:dlgTBL2");
              PrimeFaces.current().executeScript("PF('dlg').show();");
          } catch (SQLException e) {
              System.out.println("Error !!! " + e.getMessage());
          }
      }
  
      public List&lt;Map&lt;String, ColumnModel&gt;&gt; getSelectedRow() {
          try {System.out.println("Selected Row! " + selectedRow.size());} catch (Exception e) {}
  
          return selectedRow;
      }
  
      public void setSelectedRow(List&lt;Map&lt;String, ColumnModel&gt;&gt; selectedRow) {
          System.out.println( "selected size: " + selectedRow.size() );
          this.selectedRow = selectedRow;
      }
  
      public String getTableColWidths() {
          return tableColWidths;
      }
  
      public void setTableColWidths(String tableColWidths) {
          this.tableColWidths = tableColWidths;
      }
  
      public List&lt;Map&lt;String, ColumnModel&gt;&gt; getFilteredData() {
          return filteredData;
      }
  
      public void setFilteredData(List&lt;Map&lt;String, ColumnModel&gt;&gt; filteredData) {
          this.filteredData = filteredData;
      }
  }
  </code></pre>
  
  <p>Following is html portion</p>
  
  <pre><code>            &lt;p:dialog id="dlgTBL" modal="true" showEffect="bounce" widgetVar="dlg" resizable="false"&gt;
                  &lt;p:dataTable var="result" id="tbl" widgetVar="dtlTBL"
                                      value="#{liveRangeService.tableData}" 
                                      paginator="false"
                                      scrollable="true"  rowIndexVar="index"  scrollHeight="500" 
                                      scrollRows="50" liveScroll="true"
                                      filterDelay="1100"
                      &gt;
                      &lt;p:ajax event="rowSelect" listener="#{indexBean.onRowSelect}"  /&gt;
                      &lt;f:facet name="header"&gt;
                          &lt;p:outputPanel layout="inline" styleClass="tabSpacer"&gt;
                              &lt;h:outputText value="Global Filter:" /&gt;
                              &lt;p:inputText id="globalFilter" onkeyup="PF('dtlTBL').filter()" style="width:150px;margin-left:10px;"/&gt;
                          &lt;/p:outputPanel&gt;
                      &lt;/f:facet&gt;
  
                      &lt;p:column width="10"&gt;
                          &lt;f:facet name="header"&gt;
                              &lt;h:outputText value="Sr." /&gt;
                          &lt;/f:facet&gt;
                          &lt;h:outputText value="#{rowIndex+1}" /&gt;
                      &lt;/p:column&gt;
  
                      &lt;p:columns value="#{liveRangeService.tableHeaderNames}"
                                 var="mycolHeader" 
                                 width="#{colIndex==0?'10%':colIndex==1?'70%':colIndex==2?'10%':colIndex==3?'10%':'0'}" 
                                 columnIndexVar="colIndex" selectRow="true"
                                 sortBy="#{result[mycolHeader.value]}"
                                 filterBy="#{result[mycolHeader.value]}"
                                 filterMatchMode="contains"                        
                                 &gt;
                          &lt;f:facet name="header"&gt;
                              &lt;h:outputText value="#{mycolHeader.value}" /&gt;
                          &lt;/f:facet&gt;
                          &lt;h:outputText value="#{result[mycolHeader.key].value}" /&gt;
                          &lt;br /&gt;
                      &lt;/p:columns&gt;
  
                  &lt;/p:dataTable&gt;
              &lt;/p:dialog&gt;
  
  </code></pre>
  
  <p>Please advise the change in code.</p>