You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2019/07/22 10:58:34 UTC
[myfaces] branch 2.3.x updated: MYFACES-4297
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.3.x by this push:
new b9b94e8 MYFACES-4297
b9b94e8 is described below
commit b9b94e8c4ea4d53464d569b10c91eb57d1d22ffa
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Mon Jul 22 12:58:25 2019 +0200
MYFACES-4297
---
.../main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
index ff6cc9b..c2dd5b7 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
@@ -140,6 +140,9 @@ public class ViewScopeContextImpl implements Context
{
checkActive();
+ // force session creation if ViewScoped is used
+ FacesContext.getCurrentInstance().getExternalContext().getSession(true);
+
ViewScopeContextualStorage storage = getContextualStorage(false);
if (storage == null)
{
@@ -166,6 +169,9 @@ public class ViewScopeContextImpl implements Context
" doesn't implement " + PassivationCapable.class.getName());
}
+ // force session creation if ViewScoped is used
+ FacesContext.getCurrentInstance().getExternalContext().getSession(true);
+
ViewScopeContextualStorage storage = getContextualStorage(true);
Map<Object, ContextualInstanceInfo<?>> contextMap = storage.getStorage();