diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/MvcView.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/MvcView.java index 709579d5..654b725b 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/MvcView.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/MvcView.java @@ -39,8 +39,6 @@ import org.springframework.binding.mapping.impl.DefaultMapping; import org.springframework.binding.mapping.results.TargetAccessError; import org.springframework.validation.BindingResult; import org.springframework.webflow.core.collection.ParameterMap; -import org.springframework.webflow.engine.Transition; -import org.springframework.webflow.engine.TransitionableState; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.RequestContext; import org.springframework.webflow.execution.View; @@ -166,14 +164,15 @@ class MvcView implements View { private boolean shouldBind(Object model) { // this downcast is not ideal - TransitionableState currentState = (TransitionableState) context.getCurrentState(); + // TransitionableState currentState = (TransitionableState) context.getCurrentState(); // TODO this won't work because last event isn't set yet... - Transition transition = currentState.getRequiredTransition(context); - if (transition.getAttributes().contains("bind")) { - return transition.getAttributes().getBoolean("bind").booleanValue(); - } else { - return false; - } + // Transition transition = currentState.getRequiredTransition(context); + // if (transition.getAttributes().contains("bind")) { + // return transition.getAttributes().getBoolean("bind").booleanValue(); + // } else { + // return false; + // } + return false; } private MappingResults bind(Object model) { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/mvc/MvcViewFactoryTests.java b/spring-webflow/src/test/java/org/springframework/webflow/mvc/MvcViewFactoryTests.java index c334b56e..9495624f 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/mvc/MvcViewFactoryTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/mvc/MvcViewFactoryTests.java @@ -108,6 +108,7 @@ public class MvcViewFactoryTests extends TestCase { context.setExternalContext(externalContext); context.getMockFlowExecutionContext().setKey(new GeneratedFlowExecutionKey()); View view = viewFactory.getView(context); + view.postback(); assertEquals(true, view.eventSignaled()); Event e = view.getEvent(); assertEquals(view, e.getSource()); @@ -139,6 +140,7 @@ public class MvcViewFactoryTests extends TestCase { context.setExternalContext(externalContext); context.getMockFlowExecutionContext().setKey(new GeneratedFlowExecutionKey()); View view = viewFactory.getView(context); + view.postback(); assertEquals(true, view.eventSignaled()); Event e = view.getEvent(); assertEquals(view, e.getSource());