In my main jsf there are 2 jsfs where in each of them there is a table with a filter parameter.
This is a short example from the main:
<h:panelGroup id="b1"> <p:commandButton value="exe" actionListener="#{bean.handle}" rendered="#{bean.render}" update=":mainForm:panel1,:mainForm:panel2"> </p:commandButton> </h:panelGroup> </h:panelGrid> </p:panel> <ui:include src="table1.xhtml" /> <ui:include src="table2.xhtml" />
The problem is that I need to remove filters when changing the view between two tables. I cannot use the client side via clearFilters, since I have two tables:
<p:commandButton oncomplete="table1Widget.clearFilters() ????"
so I thought the best place would be on the server side using the handle method, but the filter list is empty as well as the table
DataTable dt1 = (DataTable) FacesContext.getCurrentInstance().getViewRoot().findComponent("mainForm: .... ");
How can I reset filter?
thanks
angus source share