resume
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ActionExecutingViewFactory implements ViewFactory {
|
||||
}
|
||||
}
|
||||
|
||||
public void postback() {
|
||||
public void resume() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -98,7 +98,7 @@ class MvcView implements View {
|
||||
}
|
||||
}
|
||||
|
||||
public void postback() {
|
||||
public void resume() {
|
||||
determineEventId(context);
|
||||
Object model = getModelObject();
|
||||
if (model == null) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class StubViewFactory implements ViewFactory {
|
||||
context.getFlowScope().put("renderCalled", Boolean.TRUE);
|
||||
}
|
||||
|
||||
public void postback() {
|
||||
public void resume() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user