From 0c162a4efb294efb6ac63ee42145cc33f7f1f6af Mon Sep 17 00:00:00 2001 From: "Donald J. Brown" Date: Sat, 19 Apr 2008 13:46:35 +0000 Subject: [PATCH] Cleaning up the tabs WW-2572 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@649813 13f79535-47bb-0310-9956-ffa450edef68 --- .../struts2/jsf/StrutsNavigationHandler.java | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java b/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java index 646842bb9..bd258dc1e 100644 --- a/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java +++ b/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java @@ -59,36 +59,36 @@ public class StrutsNavigationHandler extends NavigationHandler { 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); + } }