view state user event refactoring

This commit is contained in:
Keith Donald
2009-04-13 21:25:47 +00:00
parent 58c0e474bf
commit 8ae6e52d9c
13 changed files with 133 additions and 195 deletions

View File

@@ -97,24 +97,26 @@ public class JsfView implements View {
return requestContext.getRequestParameters().size() > 1;
}
/*
* Executes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through
* INVOKE_APPLICATION.
*/
public void processUserEvent() {
/*
* Executes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through
* INVOKE_APPLICATION.
*/
FacesContext facesContext = FlowFacesContext.newInstance(requestContext, facesLifecycle);
facesContext.setViewRoot(viewRoot);
try {
// TODO - render response / response complete check
facesLifecycle.execute(facesContext);
if (!hasFlowEvent()) {
requestContext.getFlashScope().put(ViewRootHolder.VIEW_ROOT_HOLDER_KEY,
new ViewRootHolder(getViewRoot()));
}
} finally {
facesContext.release();
}
}
public Object getUserEventState() {
// TODO - return view root holder
return null;
}
public boolean hasFlowEvent() {
return requestContext.getExternalContext().getRequestMap().contains(EVENT_KEY);
}