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 2010/06/11 23:16:52 UTC

svn commit: r953876 - /myfaces/core/branches/2_0_1/api/src/main/java/javax/faces/component/UIComponentBase.java

Author: lu4242
Date: Fri Jun 11 21:16:49 2010
New Revision: 953876

URL: http://svn.apache.org/viewvc?rev=953876&view=rev
Log:
MYFACES-2638 Fix PostAddToViewEvent and PreRemoveFromViewEvent publishing conditions (assign parent before publish PostAddToViewEvent, thanks to Nick Belaevski for the hint)

Modified:
    myfaces/core/branches/2_0_1/api/src/main/java/javax/faces/component/UIComponentBase.java

Modified: myfaces/core/branches/2_0_1/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_1/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=953876&r1=953875&r2=953876&view=diff
==============================================================================
--- myfaces/core/branches/2_0_1/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/branches/2_0_1/api/src/main/java/javax/faces/component/UIComponentBase.java Fri Jun 11 21:16:49 2010
@@ -173,7 +173,9 @@ public abstract class UIComponentBase ex
                 // doing this => recursive
                 _publishPreRemoveFromViewEvent(getFacesContext(), this);
             }
+            _parent = parent;
         } else {
+            _parent = parent;
             if (parent.isInView())
             {
                 // trigger the ADD_EVENT and call setInView(true)
@@ -184,7 +186,6 @@ public abstract class UIComponentBase ex
                 _publishPostAddToViewEvent(getFacesContext(), this);
             }
         }
-        _parent = parent;
     }