private void updateHistory(RequestControlContext context) { TransitionDefinition transition = context.getCurrentTransition(); History history = (History) transition.getAttributes().get("history"); if (history == null || history == History.PRESERVE) { View currentView = context.getCurrentView(); if (currentView != null && shouldRedirect(context)) { currentView.saveState(); } context.updateCurrentFlowExecutionSnapshot(); } else if (history == History.DISCARD) { context.removeCurrentFlowExecutionSnapshot(); } else if (history == History.INVALIDATE) { context.removeAllFlowExecutionSnapshots(); } }
protected void doEnter(RequestControlContext context) throws FlowExecutionException { context.assignFlowExecutionKey(); ExternalContext externalContext = context.getExternalContext(); if (externalContext.isResponseComplete()) { if (!externalContext.isResponseCompleteFlowExecutionRedirect()) { clearFlash(context); } } else { if (shouldRedirect(context)) { context.getExternalContext().requestFlowExecutionRedirect(); if (popup) { context.getExternalContext().requestRedirectInPopup(); } } else { View view = viewFactory.getView(context); context.setCurrentView(view); render(context, view); } } }
private void updateHistory(RequestControlContext context) { TransitionDefinition transition = context.getCurrentTransition(); History history = (History) transition.getAttributes().get("history"); if (history == null || history == History.PRESERVE) { View currentView = context.getCurrentView(); if (currentView != null && shouldRedirect(context)) { currentView.saveState(); } context.updateCurrentFlowExecutionSnapshot(); } else if (history == History.DISCARD) { context.removeCurrentFlowExecutionSnapshot(); } else if (history == History.INVALIDATE) { context.removeAllFlowExecutionSnapshots(); } }
protected void doEnter(RequestControlContext context) throws FlowExecutionException { context.assignFlowExecutionKey(); if (context.getExternalContext().isResponseAllowed()) { if (shouldRedirect(context)) { context.getExternalContext().requestFlowExecutionRedirect(); if (popup) { context.getExternalContext().requestRedirectInPopup(); } } else { View view = viewFactory.getView(context); render(context, view); } } }
protected void doEnter(RequestControlContext context) throws FlowExecutionException { context.assignFlowExecutionKey(); ExternalContext externalContext = context.getExternalContext(); if (externalContext.isResponseComplete()) { if (!externalContext.isResponseCompleteFlowExecutionRedirect()) { clearFlash(context); } } else { if (shouldRedirect(context)) { context.getExternalContext().requestFlowExecutionRedirect(); if (popup) { context.getExternalContext().requestRedirectInPopup(); } } else { View view = viewFactory.getView(context); context.setCurrentView(view); render(context, view); } } }