Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2852957F for ; Fri, 4 Nov 2011 16:38:14 +0000 (UTC) Received: (qmail 6941 invoked by uid 500); 4 Nov 2011 16:38:14 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 6897 invoked by uid 500); 4 Nov 2011 16:38:14 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 6890 invoked by uid 99); 4 Nov 2011 16:38:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 16:38:14 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 16:38:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1438630C519 for ; Fri, 4 Nov 2011 16:37:51 +0000 (UTC) Date: Fri, 4 Nov 2011 16:37:51 +0000 (UTC) From: "Leonardo Uribe (Resolved) (JIRA)" To: dev@myfaces.apache.org Message-ID: <1737220074.243.1320424671084.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <34167548.139.1320392220043.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (MYFACES-3385) Entered values for input fields conatined in a Composite Component are lost, if the CC is used in a datatable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MYFACES-3385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonardo Uribe resolved MYFACES-3385. ------------------------------------- Resolution: Fixed Fix Version/s: 2.1.4 2.0.10 Assignee: Leonardo Uribe Many thanks for the example webapp. It makes easier and faster debug this issue. In the optimization done over UIData, it seems this condition was not taken into account, but fortunately the fix is simple. I have attached a patch and committed the solution. > Entered values for input fields conatined in a Composite Component are lost, if the CC is used in a datatable > ------------------------------------------------------------------------------------------------------------- > > Key: MYFACES-3385 > URL: https://issues.apache.org/jira/browse/MYFACES-3385 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 2.1.2 > Reporter: Michael Dietrich > Assignee: Leonardo Uribe > Fix For: 2.0.10, 2.1.4 > > Attachments: MYFACES-3385-1.patch, MyFacesCCUIData212Test.war > > > Assume, a Composite Component contains input fields, i.e any subclass of EditableValueHolder (e.g. inputText, inputTextarea, ..). If this CC is than used in a subclass of UIData, e.g. a dataTable, the values entered in the CCs input fields get lost (despite for the last row in the Model of the UIData object). > This seems to be related to the fact how the method "saveDescendantComponentStates(..)" of the UIData class checks, if a component has childs, whos state must be saved, before changing the rowIndex. The mentioned method only checks "child.getChildCount() > 0", but getChildCount() is 0 for a CC. I assume it would be necessary to check the FacetCount for a CC instead. > The attached WAR file can help to reproduce the issue with a simple example. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira