myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1380084 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
Date Sun, 02 Sep 2012 22:52:51 GMT
Author: lu4242
Date: Sun Sep  2 22:52:51 2012
New Revision: 1380084

URL: http://svn.apache.org/viewvc?rev=1380084&view=rev
Log:
MYFACES-3601 Avoid call UIViewRoot.setViewId(...) when it is not necessary to prevent state
creation 

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1380084&r1=1380083&r2=1380084&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
Sun Sep  2 22:52:51 2012
@@ -385,9 +385,17 @@ public class FaceletViewDeclarationLangu
         }
 
         // setup our viewId
-        String renderedViewId = getRenderedViewId(context, view.getViewId());
+        String previousViewId = view.getViewId();
+        String renderedViewId = getRenderedViewId(context, previousViewId);
 
-        view.setViewId(renderedViewId);
+        if (renderedViewId == null)
+        {
+            view.setViewId(renderedViewId);
+        }
+        else if (!renderedViewId.equals(previousViewId))
+        {
+            view.setViewId(renderedViewId);
+        }
 
         if (log.isLoggable(Level.FINEST))
         {



Mime
View raw message