title: p:dataTable with Custom Filter: Could not be cast to ValueHolder Exception
body: <p>i try to implement a custom filter for my primefaces datatable. I want to Filter datestrings with a tree component. Here is a screenshot:
  <a href="https://i.stack.imgur.com/KUAFw.png" rel="noreferrer">Custom DataTable filter with Tree component</a></p>
  
  <p>And this is my column definition.</p>
  
  <pre><code>&lt;p:column filterBy="#{company.datum_wiedervorlage}" filterMatchMode="in" filterFunction="#{searchAndSelectView.filterByDatumWiedervorlage}"&gt;
      &lt;f:facet name="header"&gt;
          &lt;h:outputText style="width:150px" id="wiedervorlage_header" styleClass="single-ui-column-title" value="Datum Wiedervorlage" /&gt;
      &lt;/f:facet&gt;
      &lt;f:facet name="filter"&gt;
          &lt;p:overlayPanel for="wiedervorlage_header" hideEffect="fade" style="position: fixed" id="overlay_filter"&gt;
              &lt;p:tree value="#{searchAndSelectView.datumWiedervorlageTree}" var="entry" selectionMode="checkbox" animate="true" filterBy="#{entry}" selection="#{searchAndSelectView.selectedTreeNodeDates}"&gt;
                  &lt;p:ajax event="select" update=":form" listener="#{searchAndSelectView.onTreeNodeDateSelect}"/&gt;
                      &lt;p:treeNode&gt;
                          &lt;h:outputText value="#{entry}" /&gt;
                      &lt;/p:treeNode&gt;
              &lt;/p:tree&gt;
          &lt;/p:overlayPanel&gt;
      &lt;/f:facet&gt;
      &lt;p:cellEditor&gt;
          &lt;f:facet name="output"&gt;
              &lt;h:outputText value="#{company.datum_wiedervorlage}" /&gt;
          &lt;/f:facet&gt;
          &lt;f:facet name="input"&gt;
              &lt;p:inputText id="datum_wiedervorlage_input" value="#{company.datum_wiedervorlage}" style="width:100%" /&gt;
          &lt;/f:facet&gt;
      &lt;/p:cellEditor&gt;
  &lt;/p:column&gt;
  </code></pre>
  
  <p>The problem is know that everytime i want to filter other columns i get the following exception.</p>
  
  <pre><code>18:11:04,288 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (default task-126) java.lang.ClassCastException: org.primefaces.component.overlaypanel.OverlayPanel cannot be cast to javax.faces.component.ValueHolder
  at org.primefaces.component.datatable.feature.FilterFeature.populateFilterMetaDataWithoutColumnGroups(FilterFeature.java:396)
  at org.primefaces.component.datatable.feature.FilterFeature.populateFilterMetaData(FilterFeature.java:293)
  at org.primefaces.component.datatable.feature.FilterFeature.decode(FilterFeature.java:93)
  at org.primefaces.component.datatable.DataTable.processValidators(DataTable.java:847)
  at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:575)
  at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
  at org.primefaces.component.api.UIData.visitTree(UIData.java:827)
  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
  at javax.faces.component.UIForm.visitTree(UIForm.java:362)
  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
  at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)
  at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)
  at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:57)
  at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1193)
  at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
  at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
  at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
  at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
  at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
  at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
  at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
  at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
  at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
  at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
  at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
  at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
  at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
  at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
  at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
  at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
  at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
  at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
  at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
  at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
  at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
  at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
  at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
  at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  
  <p>I have no glue how to fix that problem. I tried to fix that with the InputHidden field component but didn't have any luck. <a href="https://stackoverflow.com/questions/23791039/primefaces-datatable-date-range-filter-with-filterfunction">Primefaces datatable date range filter with filterFunction</a></p>
  
  <p>Does someone know a possible way to get this thing to work?</p>
  
  <p><strong>Edit</strong>: As requested. I am using primefaces 6.1 and JSF 2.1</p>