My issue arises when using PrimeFaces dataTable with filterBy on a column and attempting to clear the table by clicking a link. When a filter is applied and the table is cleared, the cached data remains until the filterBy value is changed. It appears that the filterBy input component retains the event listener even after clearing the table. Here's the code snippet in question:
<h:form id="logFormId" prependId="false">
<p:dataTable value="#{logger.logLines}" var="logMsg"
id="loggerTable" dynamic="false" widgetVar="logTable">
<f:facet name="header">
<h:commandLink action="#{logger.clearList}">
<f:ajax render="@form" execute="@form" />
</h:commandLink>
</f:facet>
<p:column>
<f:facet name="header">
<h:outputText value="#{msgs.LoggerDate}" />
</f:facet>
<h:outputText value="#{logMsg.dateText}" />
</p:column>
<p:column sortBy="#{logMsg.source}"
filterBy="#{logMsg.source}" filterMatchMode="contains" >
<f:facet name="header">
<h:outputText value="#{msgs.LoggerSource} " />
</f:facet>
<h:outputText value="#{logMsg.source}" />
</p:column>
</p:dataTable>
</h:form>