deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject git commit: DELTASPIKE-471 support external handling of navigation-cases
Date Tue, 17 Dec 2013 13:16:10 GMT
Updated Branches:
  refs/heads/master accd49607 -> 3b52b8f8e


DELTASPIKE-471 support external handling of navigation-cases


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

Branch: refs/heads/master
Commit: 3b52b8f8ea3dc247a8d786ffd131b014a1294f34
Parents: accd496
Author: gpetracek <gpetracek@apache.org>
Authored: Tue Dec 17 14:13:10 2013 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Tue Dec 17 14:13:10 2013 +0100

----------------------------------------------------------------------
 .../view/navigation/NavigationCaseMapWrapper.java | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/3b52b8f8/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java
index d393860..ff21873 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java
@@ -252,10 +252,26 @@ public class NavigationCaseMapWrapper implements Map<String, Set<NavigationCase>
         @Override
         public Set<NavigationCase> put(String key, Set<NavigationCase> value)
         {
+            if (value == null)
+            {
+                return null;
+            }
+
+            Set<NavigationCase> result = new HashSet<NavigationCase>();
+
+            //filter entries created by createViewConfigBasedNavigationCases
+            for (NavigationCase navigationCase : value)
+            {
+                if (!(navigationCase.getFromOutcome() == null && navigationCase.getFromAction()
== null))
+                {
+                    result.add(navigationCase);
+                }
+            }
+
             //delegate to the wrapped instance -> the innermost handler needs to receive
it
             //(because mojarra uses ConfigurableNavigationHandler#getNavigationCases
             // to add cases for std. nav.rules from the outside)
-            return this.wrapped.getNavigationCases().put(key, value);
+            return this.wrapped.getNavigationCases().put(key, result);
         }
 
         @Override


Mime
View raw message