You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/11/19 16:55:44 UTC

svn commit: r1543465 - /myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/lifecycle/RenderResponseExecutor.java

Author: lofwyr
Date: Tue Nov 19 15:55:44 2013
New Revision: 1543465

URL: http://svn.apache.org/r1543465
Log:
TOBAGO-1347: Better solution for the case viewId=null (JSF 2.0 with Tobago 1.5)

Modified:
    myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/lifecycle/RenderResponseExecutor.java

Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/lifecycle/RenderResponseExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/lifecycle/RenderResponseExecutor.java?rev=1543465&r1=1543464&r2=1543465&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/lifecycle/RenderResponseExecutor.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/lifecycle/RenderResponseExecutor.java Tue Nov 19 15:55:44 2013
@@ -25,7 +25,6 @@ import javax.faces.application.ViewHandl
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
-import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 
 /**
@@ -44,12 +43,7 @@ class RenderResponseExecutor implements 
       if (viewRoot.getViewId() != null) {
         viewHandler.renderView(facesContext, viewRoot);
       } else {
-        Object respObj = facesContext.getExternalContext().getResponse();
-        if (respObj instanceof HttpServletResponse) {
-            HttpServletResponse respHttp = (HttpServletResponse) respObj;
-            respHttp.sendError(HttpServletResponse.SC_NOT_FOUND);
-            facesContext.responseComplete();
-        }
+        throw new FacesException("Can't render, because the viewId is <null>.");
       }
     } catch (IOException e) {
       throw new FacesException(e.getMessage(), e);