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 62426445B for ; Thu, 16 Jun 2011 00:50:09 +0000 (UTC) Received: (qmail 91192 invoked by uid 500); 16 Jun 2011 00:50:09 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 91149 invoked by uid 500); 16 Jun 2011 00:50:09 -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 91056 invoked by uid 99); 16 Jun 2011 00:50:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 00:50:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Thu, 16 Jun 2011 00:50:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8874A41AD2F for ; Thu, 16 Jun 2011 00:49:47 +0000 (UTC) Date: Thu, 16 Jun 2011 00:49:47 +0000 (UTC) From: "Ivan (JIRA)" To: dev@myfaces.apache.org Message-ID: <181254601.9409.1308185387540.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <417304547.9372.1308184727576.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MYFACES-3175) Both child and facet list should be checked while moving an existing child MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MYFACES-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050163#comment-13050163 ] Ivan commented on MYFACES-3175: ------------------------------- The case is found while trying to deploy the jsft sample (http://java.net/projects/jsftemplating) with MyFaces > Both child and facet list should be checked while moving an existing child > -------------------------------------------------------------------------- > > Key: MYFACES-3175 > URL: https://issues.apache.org/jira/browse/MYFACES-3175 > Project: MyFaces Core > Issue Type: Bug > Components: General > Affects Versions: 2.0.7 > Reporter: Ivan > > Per the Java doc of http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/component/UIComponent.html#getChildren(), if I set an existing child in the returned children list, the target child should be removed from its previous parent in both children and facet list. While currently MyFaces seems only remove from the children list. And for the facet map, now it only remove from the facet map. Is it a bug for MyFaces ? > ---> > getChildren > public abstract List getChildren() > Return a mutable List representing the child UIComponents associated with this component. The returned implementation must support all of the standard and optional List methods, plus support the following additional requirements: > The List implementation must implement the java.io.Serializable interface. > Any attempt to add a null must throw a NullPointerException > Any attempt to add an object that does not implement UIComponent must throw a ClassCastException. > Whenever a new child component is added, the parent property of the child must be set to this component instance. If the parent property of the child was already non-null, the child must first be removed from its previous parent (where it may have been either a child or a facet). > Whenever an existing child component is removed, the parent property of the child must be set to null. > After the child component has been added to the view, if the following condition is not met: > FacesContext.isPostback() returns true and FacesContext.getCurrentPhaseId() returns PhaseId.RESTORE_VIEW > Application.publishEvent(javax.faces.context.FacesContext, java.lang.Class, java.lang.Object) must be called, passing PostAddToViewEvent.class as the first argument and the newly added component as the second argument. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira