Problem with datatable and filter

UI Components for JSF
Post Reply
lmasson
Posts: 3
Joined: 18 Apr 2013, 17:48

17 Oct 2014, 10:53

Hi,

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>
In the dialog I get the wrong inputNumber.

Any suggestions?

Thanks in advance.
Primefaces 4.0.23
Primefaces-extension 1.2.1
Jboss 6.1.0.Final
JSF Mojarra 2.1.28

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 40 guests