commit | 14ccc2f0cd9426dca3097c47c907e3fbcf9296a4 | [log] [tgz] |
---|---|---|
author | Gerhard Petracek <gpetracek@apache.org> | Tue Dec 17 13:19:19 2013 +0000 |
committer | Gerhard Petracek <gpetracek@apache.org> | Tue Dec 17 13:19:19 2013 +0000 |
tree | 7c1ce4757dd9c978facf4e41be2bbdb0d47c3766 | |
parent | 6c8186175c2e492b69efb208e1deb96f23a2afdd [diff] |
EXTCDI-311 support external handling of navigation-cases git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/cdi/trunk@1551537 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/navigation/NavigationCaseMapWrapper.java b/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/navigation/NavigationCaseMapWrapper.java index 64c808e..0561a49 100644 --- a/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/navigation/NavigationCaseMapWrapper.java +++ b/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/navigation/NavigationCaseMapWrapper.java
@@ -268,10 +268,26 @@ @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