myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1760430 - in /myfaces/core/trunk: api/src/main/java/javax/faces/component/UIComponentBase.java api/src/main/java/javax/faces/component/UIData.java impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
Date Mon, 12 Sep 2016 18:31:24 GMT
Author: lu4242
Date: Mon Sep 12 18:31:24 2016
New Revision: 1760430

URL: http://svn.apache.org/viewvc?rev=1760430&view=rev
Log:
MYFACES-4048 TransientStateHolder values must be stored in the state if current phase is before
render response (add null check to fix another tck test related to UIForm.isSubmitted)

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=1760430&r1=1760429&r2=1760430&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java Mon Sep
12 18:31:24 2016
@@ -1985,7 +1985,8 @@ public abstract class UIComponentBase ex
             }
             
             Object transientState = null;
-            if (!context.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE))
+            if (context.getCurrentPhaseId() != null && 
+                !PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
             {
                 transientState = saveTransientState(context);
             }
@@ -2036,7 +2037,8 @@ public abstract class UIComponentBase ex
             values[6] = _markCreated;
             values[7] = _rendererType;
             values[8] = _capabilities;
-            if (!PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
+            if (context.getCurrentPhaseId() != null && 
+                !PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
             {
                 values[9] = saveTransientState(context);
             }

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java?rev=1760430&r1=1760429&r2=1760430&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java Mon Sep 12 18:31:24
2016
@@ -1528,7 +1528,8 @@ public class UIData extends UIComponentB
         if (initialStateMarked())
         {
             Object parentSaved = super.saveState(context);
-            if (!PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
+            if (context.getCurrentPhaseId() != null && 
+                !PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
             {
                 if (parentSaved == null &&_rowDeltaStates.isEmpty() && _rowStates.isEmpty())
                 {
@@ -1561,7 +1562,8 @@ public class UIData extends UIComponentB
         }
         else
         {
-            if (!PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
+            if (context.getCurrentPhaseId() != null && 
+                !PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
             {
                 Object values[] = new Object[4];
                 values[0] = super.saveState(context);

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java?rev=1760430&r1=1760429&r2=1760430&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
Mon Sep 12 18:31:24 2016
@@ -1567,7 +1567,8 @@ public class UIRepeat extends UIComponen
         if (initialStateMarked())
         {
             Object parentSaved = super.saveState(context);
-            if (!PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
+            if (context.getCurrentPhaseId() != null && 
+                !PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
             {
                 if (parentSaved == null /*&&_rowDeltaStates.isEmpty()*/ &&
_rowStates.isEmpty())
                 {
@@ -1601,7 +1602,8 @@ public class UIRepeat extends UIComponen
         }
         else
         {
-            if (!PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
+            if (context.getCurrentPhaseId() != null && 
+                !PhaseId.RENDER_RESPONSE.equals(context.getCurrentPhaseId()))
             {
                 Object values[] = new Object[3];
                 values[0] = super.saveState(context);



Mime
View raw message