You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ja...@apache.org on 2010/02/10 11:56:58 UTC

svn commit: r908445 - /myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java

Author: jakobk
Date: Wed Feb 10 10:56:58 2010
New Revision: 908445

URL: http://svn.apache.org/viewvc?rev=908445&view=rev
Log:
MYFACES-2544 UIViewRoot skips uncorrectly encodeBegin (Thanks to Martin Koci for this patch)

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=908445&r1=908444&r2=908445&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java Wed Feb 10 10:56:58 2010
@@ -272,11 +272,9 @@
     {
         checkNull(context, "context");
 
-        boolean skipPhase = false;
-
         try
         {
-            skipPhase = notifyListeners(context, PhaseId.RENDER_RESPONSE, getBeforePhaseListener(), true);
+            notifyListeners(context, PhaseId.RENDER_RESPONSE, getBeforePhaseListener(), true);
         }
         catch (Exception e)
         {
@@ -284,8 +282,16 @@
             logger.log(Level.SEVERE, "Exception while processing phase listener: " + e.getMessage(), e);
         }
 
-        if (!skipPhase)
+        if (!context.getResponseComplete())
         {
+            // FIXME: this path was not executed for a long time, because
+            // it was also checked for context.getRenderResponse() which
+            // was true at all times here. 
+            // The only difference here is that in super.encodeBegin(context)
+            // a PreRenderComponentEvent is published in addition to pushComponentToEL.
+            // We should check if this is ok with the spec (it seems like this should
+            // be changed) -=Jakob Korherr=-
+            
             //prerendering happens, we now publish the prerender view event
             //the specs states that the viewroot as source is about to be rendered
             //hence we issue the event immediately before publish, if the phase is not skipped