0
Talk to me, people!
I’m using the filter itself datatable
of primefaces
but it’s not working when I use it to filter the p:selectCheckboxMenu
.When I select one of the options it doesn’t find anything. I used this example and also could not https://www.primefaces.org/showcase/ui/data/datatable/filter.xhtml
The datatable
along with part of p:selectCheckboxMenu
<p:dataTable id="monografiasDataTable" widgetVar="monografiaTable"
value="#{gestaoMonografiasBean.listaMonografias}" var="monografia"
emptyMessage="Nenhuma informação a ser exibida" paginator="true"
rows="10" paginatorPosition="bottom" selectionMode="single"
selection="#{gestaoMonografiasBean.monografia}"
rowKey="#{monografia.id}" filteredValue="#{gestaoMonografiasBean.listaMonografiasFiltradas}" >
<p:ajax event="rowSelect" update="frm:toolbar" />
<p:ajax event="rowUnselect" update="frm:toolbar" />
.
.
.
<p:column filterBy="#{monografia.listaLinhaPesquisas[0].nome}" headerText="Linha de Pesquisa">
<f:facet name="filter">
<p:selectCheckboxMenu label="Linha de Pesquisa"
onchange="PF('monografiaTable').filter()"
converter="#{gestaoMonografiasBean.linhaPesquisaConverter}">
<f:selectItems value="#{gestaoMonografiasBean.listaLinhaPesquisas}"/>
</p:selectCheckboxMenu>
</f:facet>
<h:outputText value="#{monografia.listaLinhaPesquisas[0].nome}" />
</p:column>
I went through the same problem, there were several columns for research, and they didn’t work because ajax was doing pre-processing, so I had to remove the searches from the datatable and do a separate search bar
– Weslley Barbosa
@Weslleybarbosa I could send you how you implemented this query, because I am working hard to make my TCC and your code would help me a lot. My email: [email protected] Valeu!
– Daniel Azevedo