deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject git commit: DELTASPIKE-566 JSF always requires an active WindowContext
Date Wed, 09 Apr 2014 20:09:32 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master fdaf798aa -> 204b00d48


DELTASPIKE-566 JSF always requires an active WindowContext

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/204b00d4
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/204b00d4
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/204b00d4

Branch: refs/heads/master
Commit: 204b00d48143739a1292e59571ec73005fa65264
Parents: fdaf798
Author: tandraschko <tandraschko@apache.org>
Authored: Wed Apr 9 22:09:20 2014 +0200
Committer: tandraschko <tandraschko@apache.org>
Committed: Wed Apr 9 22:09:20 2014 +0200

----------------------------------------------------------------------
 .../core/impl/scope/viewaccess/ViewAccessContext.java          | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/204b00d4/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java
b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java
index 9266dd2..bd3bad9 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java
@@ -112,6 +112,12 @@ public class ViewAccessContext extends AbstractContext
 
     public void onProcessingViewFinished(String view)
     {
+        // ignore if WindowContext isn't active - our ViewAccessViewHistory is WindowScoped
+        if (!windowContext.isActive())
+        {
+            return;
+        }
+        
         // destroy beans only if the view has been changed
         if (!view.equals(viewAccessViewHistory.getLastView()))
         {


Mime
View raw message