You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mr...@apache.org on 2008/04/19 15:46:37 UTC

svn commit: r649813 - /struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java

Author: mrdon
Date: Sat Apr 19 06:46:35 2008
New Revision: 649813

URL: http://svn.apache.org/viewvc?rev=649813&view=rev
Log:
Cleaning up the tabs
WW-2572

Modified:
    struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java

Modified: struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java?rev=649813&r1=649812&r2=649813&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java (original)
+++ struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java Sat Apr 19 06:46:35 2008
@@ -59,36 +59,36 @@
     public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
         ActionContext ctx = ActionContext.getContext();
         if (outcome != null) {
-        	if (ctx == null && ctx.getActionInvocation() == null) {
-        		delegateToParentNavigation(facesContext, fromAction, outcome);
-        	} else {
-	            ActionConfig config = ctx.getActionInvocation().getProxy().getConfig();
-	            Map results = config.getResults();
-	
-	            ResultConfig resultConfig = null;
-	
-	            synchronized (config) {
-	                try {
-	                    resultConfig = (ResultConfig) results.get(outcome);
-	                } catch (NullPointerException e) {
-	                }
-	                if (resultConfig == null) {
-	                    // If no result is found for the given resultCode, try to get a wildcard '*' match.
-	                    resultConfig = (ResultConfig) results.get("*");
-	                }
-	            }
-	            if (resultConfig != null) {
-	                ctx.getActionInvocation().setResultCode(outcome);
-	            } else {
-	                delegateToParentNavigation(facesContext, fromAction, outcome);
-	            }
-        	}
+            if (ctx == null && ctx.getActionInvocation() == null) {
+                delegateToParentNavigation(facesContext, fromAction, outcome);
+            } else {
+                ActionConfig config = ctx.getActionInvocation().getProxy().getConfig();
+                Map results = config.getResults();
+    
+                ResultConfig resultConfig = null;
+    
+                synchronized (config) {
+                    try {
+                        resultConfig = (ResultConfig) results.get(outcome);
+                    } catch (NullPointerException e) {
+                    }
+                    if (resultConfig == null) {
+                        // If no result is found for the given resultCode, try to get a wildcard '*' match.
+                        resultConfig = (ResultConfig) results.get("*");
+                    }
+                }
+                if (resultConfig != null) {
+                    ctx.getActionInvocation().setResultCode(outcome);
+                } else {
+                    delegateToParentNavigation(facesContext, fromAction, outcome);
+                }
+            }
         }
     }
 
-	private void delegateToParentNavigation(FacesContext facesContext, String fromAction, String outcome) {
-		// Failing over to parent handler
-		parent.handleNavigation(facesContext, fromAction, outcome);
-	}
+    private void delegateToParentNavigation(FacesContext facesContext, String fromAction, String outcome) {
+        // Failing over to parent handler
+        parent.handleNavigation(facesContext, fromAction, outcome);
+    }
 
 }