From 33d3d2b8ebbe0fcd393571c48aea9c15bfb06919 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 6 Apr 2007 13:50:38 +0000 Subject: [PATCH] added active check (SWF-282 patch) --- .../webflow/executor/jsf/DelegatingFlowVariableResolver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/DelegatingFlowVariableResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/DelegatingFlowVariableResolver.java index a8b816af..790031ef 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/DelegatingFlowVariableResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/DelegatingFlowVariableResolver.java @@ -68,7 +68,8 @@ public class DelegatingFlowVariableResolver extends VariableResolver { */ public Object resolveVariable(FacesContext context, String name) throws EvaluationException { FlowExecution execution = FlowExecutionHolderUtils.getCurrentFlowExecution(context); - if (execution != null) { + // flow execution must be present and active (note: which means variables cannot be resolved from end-state views) + if (execution != null && execution.isActive()) { // try flash/flow/conversation if (execution.getActiveSession().getFlashMap().contains(name)) { return execution.getActiveSession().getFlashMap().get(name); @@ -80,7 +81,7 @@ public class DelegatingFlowVariableResolver extends VariableResolver { return execution.getConversationScope().get(name); } } - // no flow execution bound or flow execution attribute found with that name - delegate + // no active flow execution bound or flow execution attribute found with that name - delegate return resolverDelegate.resolveVariable(context, name); } } \ No newline at end of file