Search in sources :

Example 1 with ViewFactory

use of org.springframework.webflow.execution.ViewFactory in project cas by apereo.

the class AbstractCasWebflowConfigurer method createViewState.

@Override
public ViewState createViewState(final Flow flow, final String id, final Expression expression, final BinderConfiguration binder) {
    try {
        if (containsFlowState(flow, id)) {
            LOGGER.debug("Flow [{}] already contains a definition for state id [{}]", flow.getId(), id);
            return (ViewState) flow.getTransitionableState(id);
        }
        final ViewFactory viewFactory = this.flowBuilderServices.getViewFactoryCreator().createViewFactory(expression, this.flowBuilderServices.getExpressionParser(), this.flowBuilderServices.getConversionService(), binder, this.flowBuilderServices.getValidator(), this.flowBuilderServices.getValidationHintResolver());
        final ViewState viewState = new ViewState(flow, id, viewFactory);
        LOGGER.debug("Added view state [{}]", viewState.getId());
        return viewState;
    } catch (final Exception e) {
        LOGGER.error(e.getMessage(), e);
    }
    return null;
}
Also used : ViewFactory(org.springframework.webflow.execution.ViewFactory) ActionExecutingViewFactory(org.springframework.webflow.engine.support.ActionExecutingViewFactory) ViewState(org.springframework.webflow.engine.ViewState)

Aggregations

ViewState (org.springframework.webflow.engine.ViewState)1 ActionExecutingViewFactory (org.springframework.webflow.engine.support.ActionExecutingViewFactory)1 ViewFactory (org.springframework.webflow.execution.ViewFactory)1