PrimeFaces 8.0
<p:dataTable value="#{MyView.parents}" var="parent" id="parentID" widgetVar="parentsVar">
<p:column headerText="Column 1" sortable="true" sortBy="#{parent.name}" filterable="true" filterBy="#{parent.name}" filterMatchMode="contains" filterFunction="#{FilterController.filterByString}">
<f:facet name="filter">
<p:selectCheckboxMenu label=""
onchange="PF('parentsVar').filter()" updateLabel="true">
<f:selectItems value="#{MyView.namesForFilter}" />
</p:selectCheckboxMenu>
</f:facet>
<h:outputText value="#{parent.name}"/>
</p:column>
<p:column >
<p:rowToggler >
</p:rowToggler>
</p:column>
<p:rowExpansion>
<p:dataTable value="#{parent.children}" var="child" id="childID" widgetVar="childVar">
<p:column headerText="Child Type" filterable="true" filterBy="#{child.type}"
filterMatchMode="contains" filterFunction="#{FilterController.filterByString}">
<f:facet name="filter">
<p:selectCheckboxMenu label=""
onchange="PF('childVar').filter()">
<f:selectItems value="#{utilityPSA.childTypesForFilter}" />
</p:selectCheckboxMenu>
</f:facet>
<h:outputText value="#{child.type}"/>
</p:column>
</p:dataTable>
</p:rowExpansion>
</p:dataTable>
Two issues:
- Filtering is not working when I have two rowexpansion columns expanded
- Filtering on a child table in a row expansion is replacing all the other row expansions with same filtered child record even though the child data doesn't belong to the row expansion.
Any help appreciated. Thanks for your time.