[seam-commits] Seam SVN: r15017 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Aug 7 13:05:51 EDT 2012


Author: manaRH
Date: 2012-08-07 13:05:50 -0400 (Tue, 07 Aug 2012)
New Revision: 15017

Modified:
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java
Log:
JBSEAM-5007 SeamNavigationHandler extends ConfigurableNavigationHandler instead of pure NavigationHandler

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java	2012-08-06 19:43:32 UTC (rev 15016)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java	2012-08-07 17:05:50 UTC (rev 15017)
@@ -1,5 +1,10 @@
 package org.jboss.seam.jsf;
 
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.application.ConfigurableNavigationHandler;
+import javax.faces.application.NavigationCase;
 import javax.faces.application.NavigationHandler;
 import javax.faces.context.FacesContext;
 
@@ -16,7 +21,7 @@
  * @author Gavin King
  *
  */
-public class SeamNavigationHandler extends NavigationHandler 
+public class SeamNavigationHandler extends ConfigurableNavigationHandler 
 {
    
    private final NavigationHandler baseNavigationHandler;
@@ -51,4 +56,30 @@
       return outcome!=null && outcome.startsWith("/");
    }
 
+   @Override
+   public NavigationCase getNavigationCase(FacesContext context, String fromAction, String outcome)
+   {
+      if (baseNavigationHandler instanceof ConfigurableNavigationHandler)
+      {
+         return ((ConfigurableNavigationHandler) baseNavigationHandler).getNavigationCase(context, fromAction, outcome);
+      }
+      else
+      {
+         return null;
+      }
+   }
+
+   @Override
+   public Map<String, Set<NavigationCase>> getNavigationCases()
+   {
+      if (baseNavigationHandler instanceof ConfigurableNavigationHandler)
+      {
+         return ((ConfigurableNavigationHandler) baseNavigationHandler).getNavigationCases();
+      }
+      else
+      {
+         return null;
+      }
+   }
+
 }



More information about the seam-commits mailing list