You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by em...@apache.org on 2017/10/27 21:05:13 UTC
svn commit: r1813576 -
/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
Author: embreijo
Date: Fri Oct 27 21:05:13 2017
New Revision: 1813576
URL: http://svn.apache.org/viewvc?rev=1813576&view=rev
Log:
MYFACES-4164 Unexpected behavior when javax.faces.ViewState is set to stateless in a State view
Modified:
myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
Modified: myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1813576&r1=1813575&r2=1813576&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java (original)
+++ myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java Fri Oct 27 21:05:13 2017
@@ -2124,17 +2124,25 @@ public class FaceletViewDeclarationLangu
{
view = context.getApplication().getViewHandler().createView(context, viewId);
}
- context.setViewRoot (view);
- boolean oldContextEventState = context.isProcessingEvents();
- try
+ // If the view is not transient, then something is wrong. Throw an exception.
+ if (!view.isTransient())
{
- context.setProcessingEvents (true);
- vdl.buildView (context, view);
- }
- finally
- {
- context.setProcessingEvents (oldContextEventState);
+ throw new FacesException ("unable to create view \"" + viewId + "\"");
}
+ else
+ {
+ context.setViewRoot (view);
+ boolean oldContextEventState = context.isProcessingEvents();
+ try
+ {
+ context.setProcessingEvents (true);
+ vdl.buildView (context, view);
+ }
+ finally
+ {
+ context.setProcessingEvents (oldContextEventState);
+ }
+ }
}
catch (Throwable e)
{