0
I’m using the P:datatable component of Primefaces and I’m having trouble with the filter. I have a list of Email Sectors and within that list I have another list with the aliases of each email.
Code:
<h:panelGroup id="tabelaEmails" >
<div class="tabelaEmails" >
<p:dataTable id="tabelaFiltro" var="item" value="#{emailSetorBean.sessionBean.itemPagina.listaEmailSetor}"
widgetVar="dataWidget"
emptyMessage="Nenhum registro encontrado com os dados buscados.">
<p:column filterBy="#{item.email}" headerText="E-Mail" filterMatchMode="contains"
filterValue="#{emailSetorBean.sessionBean.filtroAlteracao}">
<h:outputText value="#{item.email}" />
</p:column>
<p:column filterBy="#{item.descricao}" headerText="Descrição" filterMatchMode="contains">
<h:outputText value="#{item.descricao}" />
</p:column>
<p:column filterBy="#{item.setor.descricao}" headerText="Setor" filterMatchMode="contains">
<h:outputText value="#{item.setor.descricao}" />
</p:column>
<p:column headerText="Alias" filterBy="#{item.listaAlias}" filterMatchMode="contains">
<h:dataTable var="alias" value="#{item.listaAlias}" >
<p:column>
<h:outputText value="#{alias.email}"/>
</p:column>
</h:dataTable>
</p:column>
</p:dataTable>
</div>
</h:panelGroup>
The last column is where the aliases are. I put filterBy="#{item.listAlias}" only that the listAlias is a list of type Email, which in turn has the attributes idGoogle and E-mail. I wanted to filter by e-mail. Is there any way to do this using the component?
Thank you!