After filtering of primefaces 'tasksDataTable', the 'number of records' does not update. For example before filtering number of records is 45, and by filtering table i get 3 records as result. But 'number of records' is already 45 (i expect to show 3 for 'number of records' after filtering). How can i handle it?
<p:dataTable var="recordEntity"
id="rulesDataTable"
widgetVar="rulesDataTable"
value="#{bossCartable.tasksDataTable}"
paginator="true"
paginatorAlwaysVisible="false"
rows="#{paginationModel.rows}"
paginatorTemplate="#{paginationModel.paginationTemplate}"
rowsPerPageTemplate="#{paginationModel.rowsPerPageTemplate}"
currentPageReportTemplate="#{paginationModel.currentPageReportTemplate}"
selectionMode="single"
selection="#{bossCartable.selectedRuleRow}"
rowIndexVar="rowIndex"
sortBy="#{recordEntity.id}"
emptyMessage="No record found!"
rowKey="#{recordEntity.id}"
resizableColumns="true"
>
<f:facet name="header">
<div class="row align-content-center">
Tasks
<h:outputLabel value="number of records: #{bossCartable.tasksDataTable.size()}"/>
</div>
</f:facet>
<p:column headerText="id" width="5%" filterMatchMode="contains"
filterBy="#{recordEntity.id}" sortBy="#{recordEntity.id}" sortable="true">
<h:outputText value="#{recordEntity.id}"/>
</p:column>
<p:column headerText="description" filterMatchMode="contains"
filterBy="#{recordEntity.description}">
<h:outputText value="#{recordEntity.description}"/>
</p:column>
<p:column headerText="startDate" width="8%" filterMatchMode="contains"
filterBy="#{recordEntity.startDate}">
<h:outputText value="#{recordEntity.startDate}"/>
</p:column>
<p:column headerText="endDate" width="8%" filterMatchMode="contains"
filterBy="#{recordEntity.endDate}">
<h:outputText value="#{recordEntity.endDate}"/>
</p:column>
</p:dataTable>