I have a column in a datatable and I want to add a filter with this code:
<p:dataTable id="aDataTable" var="aVariable" value="#{aView.values}" paginator="true" rows="10" selectionMode="single" selection="#{aView.selection}" onRowSelectUpdate="aForm">
<f:facet name="header">
A List
</f:facet>
<p:column sortBy="#{aVariable.id}" filterBy="#{aVariable.id}" filterEvent="change">
<f:facet name="header">
<h:outputText value="No"/>
</f:facet>
<h:outputText value="#{aVariable.id}"/>
</p:column>
<p:column sortBy="#{aVariable.date}" filterBy="#{aVariable.date}" filterEvent="change">
<f:facet name="header">
<h:outputText value="Date"/>
</f:facet>
</p:dataTable>
date is inputted in a form in this format:
<h:outputText value="Date: *"/>
<p:calendar pattern="dd/MM/yyyy" value="#{aView.value.date}"/>
Filter is working for id but not for date. What is the reason for this and how can I make filter work in this case?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…