このhttp://www.primefaces.org/showcase-labs/ui/datatableFiltering.jsfに従って、フィルタリング付きのデータテーブルを開発するためにprimefaces 3.4RC1を使用しました。しかし、いくつかの問題があります。何かをフィルタリングした後、レコードが繰り返し表示されます。たとえば、レコードが 1 つしかない場合は 5 回繰り返され、レコードが 2 つある場合は 10 回繰り返されます。その問題の理由は何ですか?
<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>
ありがとう