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/05/21 23:42:55 UTC

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

Author: lu4242
Date: Fri May 21 21:42:54 2010
New Revision: 947191

URL: http://svn.apache.org/viewvc?rev=947191&view=rev
Log:
Do not try to relocate if org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE is false and c:if is used inside a composite component.

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.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=947191&r1=947190&r2=947191&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 Fri May 21 21:42:54 2010
@@ -127,6 +127,13 @@ public class InsertChildrenHandler exten
             {
                 //All composite components are NamingContainer and the target is inside it, so we can remove the prefix.
                 _targetComponent = parentCompositeComponent.findComponent(_targetClientId.substring(parentCompositeComponent.getClientId().length()+1));
+                
+                if (_targetComponent == null)
+                {
+                    //Could happen in no org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE
+                    //In this case we cannot relocate, just return;
+                    return;
+                }
             }
 
             if (parentCompositeComponent.getChildCount() <= 0)

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java?rev=947191&r1=947190&r2=947191&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java Fri May 21 21:42:54 2010
@@ -155,6 +155,13 @@ public class InsertFacetHandler extends 
             {
                 //All composite components are NamingContainer and the target is inside it, so we can remove the prefix.
                 _targetComponent = parentCompositeComponent.findComponent(_targetClientId.substring(parentCompositeComponent.getClientId().length()+1));
+                
+                if (_targetComponent == null)
+                {
+                    //Could happen in no org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE
+                    //In this case we cannot relocate, just return;
+                    return;
+                }
             }            
                         
             if (facetComponent != null)