Skip to content

Commit ff89ab8

Browse files
author
graeme
committed
upgrade to spring webflow 2.0 m1
git-svn-id: https://svn.codehaus.org/grails/trunk@5267 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent baea3ac commit ff89ab8

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed
-84.8 KB
Binary file not shown.

lib/spring-binding-2.0-m1.jar

91.1 KB
Binary file not shown.
-407 KB
Binary file not shown.

lib/spring-webflow-2.0-m1.jar

381 KB
Binary file not shown.

src/groovy/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilder.groovy

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import org.springframework.webflow.engine.Transition;
2020
import org.springframework.webflow.engine.Flow;
2121
import org.springframework.webflow.engine.builder.AbstractFlowBuilder;
2222
import org.springframework.webflow.engine.builder.FlowBuilderException;
23-
import org.springframework.webflow.engine.support.TransitionExecutingStateExceptionHandler;
2423
import org.springframework.webflow.core.collection.LocalAttributeMap;
2524
import org.springframework.webflow.execution.Event;
2625
import org.apache.commons.logging.LogFactory
@@ -36,6 +35,7 @@ import org.springframework.context.ApplicationContextAware
3635
import org.springframework.context.ApplicationContext
3736
import org.codehaus.groovy.grails.web.mapping.UrlMappingsHolder
3837
import org.codehaus.groovy.grails.web.mapping.UrlCreator
38+
import org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler
3939

4040
/**
4141
* <p>A builder implementation used to construct Spring Webflows. This is a DSL specifically
@@ -101,7 +101,9 @@ class FlowBuilder extends AbstractFlowBuilder implements GroovyObject, Applicati
101101
this.flowClosure.call();
102102
flowDefiningMode = false;
103103
initialised = true;
104-
return super.getFlow();
104+
Flow flow = super.getFlow()
105+
flow.attributeMap.put("persistenceContext", true)
106+
return flow;
105107
}
106108
else if(flowDefiningMode) {
107109
if(isFirstArgumentClosure(args)) {
@@ -133,9 +135,11 @@ class FlowBuilder extends AbstractFlowBuilder implements GroovyObject, Applicati
133135
State state
134136
if(flowInfo.redirectUrl) {
135137
state = addEndState(name, flowInfo.redirectUrl );
138+
state.attributeMap.put("commit", true)
136139
}
137140
else if(trans.length == 0 && flowInfo.subflow == null) {
138141
state = addEndState(name, name);
142+
state.attributeMap.put("commit", true)
139143
}
140144
else if(action) {
141145
// add action state
@@ -188,7 +192,9 @@ class FlowBuilder extends AbstractFlowBuilder implements GroovyObject, Applicati
188192
return state;
189193
}
190194
else {
191-
return addEndState(name, name);
195+
State state = addEndState(name, name)
196+
state.attributeMap.put("commit", true)
197+
return state;
192198
}
193199
}
194200
else {
@@ -359,7 +365,7 @@ class TransitionTo {
359365
}
360366
public Object to(String newTo) {
361367
if(error != null) {
362-
TransitionExecutingStateExceptionHandler handler = new TransitionExecutingStateExceptionHandler();
368+
TransitionExecutingFlowExecutionExceptionHandler handler = new TransitionExecutingFlowExecutionExceptionHandler();
363369
handler.add(error, newTo);
364370
builder.getFlow().getExceptionHandlerSet().add(handler);
365371
return handler;

0 commit comments

Comments
 (0)