Since version 4.0.17 there is an issue in datatable with filter. Actually if I edit a row in a filtered datatable I get a wrong row ; the edited row is the row of the datatable not filtered.
Example :
Code: Select all
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:form id="inputListForm">
<p:dataTable var="currentInputBean" value="#{myBean.inputBeans}" filteredValue="#{myBean.filteredInputBeans}">
<p:column width="20">
<p:commandLink action="#{myBean.viewInputAction}" update=":body:inputDialogId"
oncomplete="PF('inputDialog').show()" styleClass="ui-icon ui-icon-pencil">
<f:setPropertyActionListener target="#{myBean.inputBean}" value="#{currentInputBean}" />
</p:commandLink>
</p:column>
<p:column headerText="Number" filterBy="#{currentInputBean.inputNumber}" filterMatchMode="contains">
<h:outputText value="#{currentInputBean.inputNumber}" />
</p:column>
</p:dataTable>
</h:form>
<p:dialog id="inputDialogId" header="Test" severity="info" widgetVar="inputDialog" position="center top" modal="true"
width="300" height="150" resizable="true" showEffect="slide" hideEffect="slide" appendTo="@(body)">
<h:form id="inputForm">
<h:outputText value="#{myBean.inputBean.inputNumber}" />
</h:form>
</p:dialog>
</html>
Any suggestions?
Thanks in advance.