From 943da1ab7c2570b1d0501bd29762537446dad8be Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Mon, 9 Apr 2007 20:57:10 +0000 Subject: [PATCH] only restore if not restored already... --- .../webflow/executor/jsf/FlowExecutionKeyStateHolder.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/FlowExecutionKeyStateHolder.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/FlowExecutionKeyStateHolder.java index 993a408b..a1da66dc 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/FlowExecutionKeyStateHolder.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/jsf/FlowExecutionKeyStateHolder.java @@ -111,9 +111,10 @@ public class FlowExecutionKeyStateHolder extends UIComponentBase { private void restoreFlowExecution(FacesContext facesContext) { JsfExternalContext context = new JsfExternalContext(facesContext); - if (StringUtils.hasText(flowExecutionKey)) { - // restore flow execution from repository so it will be available to variable/property resolvers - // and the flow navigation handler (this could happen as part of a submission or flow execution redirect) + // restore only if the key is present and the current flow execution has not already been restored + if (StringUtils.hasText(flowExecutionKey) && !FlowExecutionHolderUtils.isFlowExecutionRestored(facesContext)) { + // restore the "current" flow execution from repository so it will be available to variable/property resolvers + // and the flow navigation handler (this could happen as part of a view action like a form submission) FlowExecutionRepository repository = getRepository(context); FlowExecutionKey key; // restore the key from the stored flowExecutionKey