I used primefaces 3.4RC1 for develop a data table with filtering by following this http://www.primefaces.org/showcase-labs/ui/datatableFiltering.jsf. But I have some issue.After filtering some thing it gives the records repeatedly.for an example if there is only one record,it repeats 5 times and if there are 2 records it repeats 10 times. What is the reason for that issue?
<p:dataTable id="tableList" var="tablevar" value="#{tableBean.table}"
style="font-size: 12px; width:1310px;" widgetVar="carsTable"
emptyMessage="No recode found with given criteria" filteredValue="#{tableBean.filteredCars }"
scrollable="true" scrollHeight="450" resizableColumns="flase">
<f:facet name="header">
<p:outputPanel style="display:block; text-align:right">
<h:outputText value="Search all fields:"/>
<p:inputText id="globalFilter" onkeyup="carsTable.filter()" style="width:150px" />
</p:outputPanel>
</f:facet>
<p:column headerText="ID" width="50">
<h:outputText value="#{tablevar.id}" style="font: medium "/>
</p:column>
<p:column headerText="Country" width="50" filterBy="#{tablevar.country}" filterMatchMode="contains">
<h:outputText value="#{tablevar.country}" style="font: medium"/>
</p:column>
<p:column headerText="Country Code" width="50" filterBy="#{tablevar.country_code}" filterMatchMode="contains">
<h:outputText value="#{tablevar.country_code}" style="font: medium "/>
</p:column>
<p:column headerText="MGT" width="50" filterBy="#{tablevar.MGT}" filterMatchMode="contains">
<h:outputText value="#{tablevar.MGT}" style="font: medium "/>
</p:column>
<f:facet name="footer" id="foot">
<h:panelGrid columns="8" cellpadding="5" id="pane" >
<h:outputLabel value="Country" />
<p:inputText value="#{tableBean.c_country}" id="country" required="false" label="country" />
<h:outputLabel value="Country_Code" />
<p:inputText value="#{tableBean.c_country_code}" id="countrycode" required="false" label="countrycode" />
<h:outputLabel value="MGT" />
<p:inputText value="#{tableBean.c_MGT}" id="mgt" required="false" label="mgt" />
<p:commandButton id="loginButton" value="AddNew" update=":form:messages" actionListener="#{tableBean.addNew}" oncomplete="javascript:location.reload(true)" onstart="return myFunction3();"/>
<p:commandButton type="reset" value="Clear" oncomplete="javascript:location.reload(true)"/>
</h:panelGrid>
</f:facet>
</p:dataTable>
Thanks