From efd440f0b55e2fca8a06c9952b719e5eae928729 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Thu, 20 Mar 2008 16:47:02 +0000 Subject: [PATCH] resume --- .../org/springframework/webflow/engine/ViewState.java | 2 +- .../builder/support/ActionExecutingViewFactory.java | 2 +- .../java/org/springframework/webflow/execution/View.java | 4 ++-- .../org/springframework/webflow/mvc/view/MvcView.java | 2 +- .../webflow/test/MockViewFactoryCreator.java | 8 ++++---- .../springframework/webflow/engine/StubViewFactory.java | 2 +- .../springframework/webflow/mvc/MvcViewFactoryTests.java | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java index bcfbd803..ec474a53 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java @@ -175,7 +175,7 @@ public class ViewState extends TransitionableState { public void resume(RequestControlContext context) { restoreVariables(context); View view = viewFactory.getView(context); - view.postback(); + view.resume(); if (view.eventSignaled()) { Event event = view.getEvent(); if (logger.isDebugEnabled()) { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/support/ActionExecutingViewFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/support/ActionExecutingViewFactory.java index 46a59e4f..c6d3bd9b 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/support/ActionExecutingViewFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/support/ActionExecutingViewFactory.java @@ -66,7 +66,7 @@ public class ActionExecutingViewFactory implements ViewFactory { } } - public void postback() { + public void resume() { } diff --git a/spring-webflow/src/main/java/org/springframework/webflow/execution/View.java b/spring-webflow/src/main/java/org/springframework/webflow/execution/View.java index c81117f4..d198b3bf 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/execution/View.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/execution/View.java @@ -38,9 +38,9 @@ public interface View { public void render() throws IOException; /** - * Execute the view postback lifecycle. This typically results in a view model binding and validation. + * Execute the view resume lifecycle. This typically results in a view model binding and validation. */ - public void postback(); + public void resume(); /** * Returns true if an event occurred the flow system should handle. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java index 900f4aff..fcb01385 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java @@ -98,7 +98,7 @@ class MvcView implements View { } } - public void postback() { + public void resume() { determineEventId(context); Object model = getModelObject(); if (model == null) { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/test/MockViewFactoryCreator.java b/spring-webflow/src/main/java/org/springframework/webflow/test/MockViewFactoryCreator.java index 27913f23..85c1c98e 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/test/MockViewFactoryCreator.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/test/MockViewFactoryCreator.java @@ -96,12 +96,12 @@ class MockViewFactoryCreator implements ViewFactoryCreator { return viewId; } - public boolean eventSignaled() { - return context.getRequestParameters().contains("_eventId"); + public void resume() { + // TODO - implement me as appropriate for a test environment } - public void postback() { - // TODO - implement me as appropriate for a test environment + public boolean eventSignaled() { + return context.getRequestParameters().contains("_eventId"); } public Event getEvent() { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/engine/StubViewFactory.java b/spring-webflow/src/test/java/org/springframework/webflow/engine/StubViewFactory.java index 92cfd813..9180d4e4 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/engine/StubViewFactory.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/engine/StubViewFactory.java @@ -37,7 +37,7 @@ public class StubViewFactory implements ViewFactory { context.getFlowScope().put("renderCalled", Boolean.TRUE); } - public void postback() { + public void resume() { } 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 e90d81d1..b49fa10f 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 @@ -109,7 +109,7 @@ public class MvcViewFactoryTests extends TestCase { context.setExternalContext(externalContext); context.getMockFlowExecutionContext().setKey(new GeneratedFlowExecutionKey()); View view = viewFactory.getView(context); - view.postback(); + view.resume(); assertEquals(true, view.eventSignaled()); Event e = view.getEvent(); assertEquals(view, e.getSource()); @@ -141,7 +141,7 @@ public class MvcViewFactoryTests extends TestCase { context.setExternalContext(externalContext); context.getMockFlowExecutionContext().setKey(new GeneratedFlowExecutionKey()); View view = viewFactory.getView(context); - view.postback(); + view.resume(); assertEquals(true, view.eventSignaled()); Event e = view.getEvent(); assertEquals(view, e.getSource());