private ViewState getCurrentViewState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof ViewState)) { throw new IllegalStateException("You can only resume paused view states, and state " + context.getCurrentState() + " is not a view state - programmer error"); } return (ViewState) currentState; }
private TransitionableState getCurrentTransitionableState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof TransitionableState)) { throw new IllegalStateException("You can only signal events in transitionable states, and state " + context.getCurrentState() + " is not transitionable - programmer error"); } return (TransitionableState) currentState; }
if (context.getFlowExecutionContext().isActive()) { logger.debug("Completed transition execution. As a result, the new state is '" + context.getCurrentState().getId() + "' in flow '" + context.getActiveFlow().getId() + "'"); } else {
private ViewState getCurrentViewState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof ViewState)) { throw new IllegalStateException("You can only resume paused view states, and state " + context.getCurrentState() + " is not a view state - programmer error"); } return (ViewState) currentState; }
private TransitionableState getCurrentTransitionableState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof TransitionableState)) { throw new IllegalStateException("You can only signal events in transitionable states, and state " + context.getCurrentState() + " is not transitionable - programmer error"); } return (TransitionableState) currentState; }
private TransitionableState getCurrentTransitionableState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof TransitionableState)) { throw new IllegalStateException("You can only signal events in transitionable states, and state " + context.getCurrentState() + " is not transitionable - programmer error"); } return (TransitionableState) currentState; }
private ViewState getCurrentViewState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof ViewState)) { throw new IllegalStateException("You can only resume paused view states, and state " + context.getCurrentState() + " is not a view state - programmer error"); } return (ViewState) currentState; }
/** * Returns the current state and makes sure it is transitionable. */ private TransitionableState getCurrentTransitionableState(RequestControlContext context) { State currentState = (State) context.getCurrentState(); if (!(currentState instanceof TransitionableState)) { throw new IllegalStateException("You can only signal events in transitionable states, and state " + context.getCurrentState() + " is not transitionable - programmer error"); } return (TransitionableState) currentState; }
if (context.getFlowExecutionContext().isActive()) { logger.debug("Completed transition execution. As a result, the new state is '" + context.getCurrentState().getId() + "' in flow '" + context.getActiveFlow().getId() + "'"); } else {
if (context.getFlowExecutionContext().isActive()) { logger.debug("Completed transition execution. As a result, the new state is '" + context.getCurrentState().getId() + "' in flow '" + context.getActiveFlow().getId() + "'"); } else {
if (context.getFlowExecutionContext().isActive()) { logger.debug("Completed execution of " + this + ", as a result the new state is '" + context.getCurrentState().getId() + "' in flow '" + context.getActiveFlow().getId() + "'"); } else { logger.debug("Completed execution of " + this + ", as a result the flow execution has ended");
/** * <p>doEnterHelper.</p> * * @param context a {@link org.springframework.webflow.engine.RequestControlContext} object. * @param stepNumber a int. */ public static void doEnterHelper(RequestControlContext context, int stepNumber){ String stateId = context.getCurrentState().getId(); PageFlowSession.get().getFlowState().setCurrentViewStateId(stateId); PageFlowSession.get().getFlowState().setCurrentViewStepNumber(stepNumber,stateId); }
public void handle(FlowExecutionException exception, RequestControlContext requestControlContext) { requestControlContext.getMessageContext().addMessage( new MessageBuilder() .error() .source(null) .defaultText( findBusinessException(exception).getMessage()) .build()); Object testState = requestControlContext.getCurrentState(); if (testState instanceof ViewState) { ViewState viewState = (ViewState) testState; try { viewState.getViewFactory().getView(requestControlContext) .render(); } catch (IOException e) { e.printStackTrace(); // Properly handle rendering errors here } } }