You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/11/30 20:42:51 UTC

svn commit: r885562 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java

Author: lu4242
Date: Mon Nov 30 19:42:51 2009
New Revision: 885562

URL: http://svn.apache.org/viewvc?rev=885562&view=rev
Log:
MYFACES-2432 InsertChildrenHandler.RelocateAllChildrenListener throws IndexOutOfBoundsException (thanks to Michaek Kurz for this patch)

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java?rev=885562&r1=885561&r2=885562&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java Mon Nov 30 19:42:51 2009
@@ -52,15 +52,15 @@
             throws IOException
     {
         UIComponent parentCompositeComponent = ((AbstractFaceletContext)ctx).getCompositeComponentFromStack();
-        
-        parentCompositeComponent.subscribeToEvent(PostAddToViewEvent.class, 
-                new RelocateAllChildrenListener(parent, parentCompositeComponent.getChildCount()));
+
+        parentCompositeComponent.subscribeToEvent(PostAddToViewEvent.class,
+                new RelocateAllChildrenListener(parent, parent.getChildCount()));
         
         if (ctx.getFacesContext().getAttributes().containsKey(
                 FaceletViewDeclarationLanguage.MARK_INITIAL_STATE_KEY))
         {
             parentCompositeComponent.subscribeToEvent(PostBuildComponentTreeOnRestoreViewEvent.class, 
-                    new RelocateAllChildrenListener(parent, parentCompositeComponent.getChildCount()));
+                    new RelocateAllChildrenListener(parent, parent.getChildCount()));
         }
     }