private void parseAndAddViewState(ViewStateModel state, Flow flow) { ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), false, state.getBinder()); Boolean redirect = null; if (StringUtils.hasText(state.getRedirect())) { redirect = (Boolean) fromStringTo(Boolean.class).execute(state.getRedirect()); } boolean popup = false; if (StringUtils.hasText(state.getPopup())) { popup = ((Boolean) fromStringTo(Boolean.class).execute(state.getPopup())); } MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); if (state.getModel() != null) { attributes.put( "model", getLocalContext().getExpressionParser().parseExpression(state.getModel(), new FluentParserContext().evaluate(RequestContext.class))); } if (state.getValidationHints() != null) { attributes.put("validationHints", getLocalContext().getExpressionParser().parseExpression(state.getValidationHints(), new FluentParserContext().evaluate(RequestContext.class))); } parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createViewState(state.getId(), flow, parseViewVariables(state.getVars()), parseActions(state.getOnEntryActions()), viewFactory, redirect, popup, parseActions(state.getOnRenderActions()), parseTransitions(state.getTransitions()), parseExceptionHandlers(state.getExceptionHandlers(), state.getTransitions()), parseActions(state.getOnExitActions()), attributes); }
/** * Adds a view state to the flow built by this builder. * @param stateId the state identifier * @param entryActions the actions to execute when the state is entered * @param viewSelector the view selector that will make the view selection when the state is entered * @param renderActions any 'render actions' to execute on state entry and refresh; may be null * @param transitions the transitions (path) out of this state * @param exceptionHandlers any exception handlers to attach to the state * @param exitActions the actions to execute when the state exits * @param attributes attributes to assign to the state that may be used to affect state construction and execution * @return the fully constructed view state instance */ protected State addViewState(String stateId, Action[] entryActions, ViewSelector viewSelector, Action[] renderActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes) { return getFlowArtifactFactory().createViewState(stateId, getFlow(), entryActions, viewSelector, renderActions, transitions, exceptionHandlers, exitActions, attributes); }
/** * Adds a view state to the flow built by this builder. * @param stateId the state identifier * @param viewName the string-encoded view selector * @param renderAction the action to execute on state entry and refresh; may be null * @param transition the sole transition (path) out of this state * @return the fully constructed view state instance */ protected State addViewState(String stateId, String viewName, Action renderAction, Transition transition) { return getFlowArtifactFactory().createViewState(stateId, getFlow(), null, viewSelector(viewName), new Action[] { renderAction }, new Transition[] { transition }, null, null, null); }
/** * Adds a view state to the flow built by this builder. * @param stateId the state identifier * @param viewName the string-encoded view selector * @param transition the sole transition (path) out of this state * @return the fully constructed view state instance */ protected State addViewState(String stateId, String viewName, Transition transition) { return getFlowArtifactFactory().createViewState(stateId, getFlow(), null, viewSelector(viewName), null, new Transition[] { transition }, null, null, null); }
/** * Adds a view state to the flow built by this builder. * @param stateId the state identifier * @param viewName the string-encoded view selector * @param renderAction the action to execute on state entry and refresh; may be null * @param transitions the transitions (paths) out of this state * @return the fully constructed view state instance */ protected State addViewState(String stateId, String viewName, Action renderAction, Transition[] transitions) { return getFlowArtifactFactory().createViewState(stateId, getFlow(), null, viewSelector(viewName), new Action[] { renderAction }, transitions, null, null, null); }
/** * Adds a view state to the flow built by this builder. * @param stateId the state identifier * @param viewName the string-encoded view selector * @param transitions the transitions (paths) out of this state * @return the fully constructed view state instance */ protected State addViewState(String stateId, String viewName, Transition[] transitions) { return getFlowArtifactFactory().createViewState(stateId, getFlow(), null, viewSelector(viewName), null, transitions, null, null, null); }
private void parseAndAddViewState(Element element, Flow flow) { getFlowArtifactFactory().createViewState(parseId(element), flow, parseEntryActions(element), parseViewSelector(element), parseRenderActions(element), parseTransitions(element), parseExceptionHandlers(element), parseExitActions(element), parseAttributes(element)); }
private void parseAndAddViewState(ViewStateModel state, Flow flow) { ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), false, state.getBinder()); Boolean redirect = null; if (StringUtils.hasText(state.getRedirect())) { redirect = (Boolean) fromStringTo(Boolean.class).execute(state.getRedirect()); } boolean popup = false; if (StringUtils.hasText(state.getPopup())) { popup = ((Boolean) fromStringTo(Boolean.class).execute(state.getPopup())).booleanValue(); } MutableAttributeMap attributes = parseMetaAttributes(state.getAttributes()); if (state.getModel() != null) { attributes.put("model", getLocalContext().getExpressionParser().parseExpression(state.getModel(), new FluentParserContext().evaluate(RequestContext.class))); } parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createViewState(state.getId(), flow, parseViewVariables(state.getVars()), parseActions(state.getOnEntryActions()), viewFactory, redirect, popup, parseActions(state.getOnRenderActions()), parseTransitions(state.getTransitions()), parseExceptionHandlers(state.getExceptionHandlers(), state.getTransitions()), parseActions(state.getOnExitActions()), attributes); }
private void parseAndAddViewState(ViewStateModel state, Flow flow) { ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), false, state.getBinder()); Boolean redirect = null; if (StringUtils.hasText(state.getRedirect())) { redirect = (Boolean) fromStringTo(Boolean.class).execute(state.getRedirect()); } boolean popup = false; if (StringUtils.hasText(state.getPopup())) { popup = ((Boolean) fromStringTo(Boolean.class).execute(state.getPopup())); } MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); if (state.getModel() != null) { attributes.put( "model", getLocalContext().getExpressionParser().parseExpression(state.getModel(), new FluentParserContext().evaluate(RequestContext.class))); } if (state.getValidationHints() != null) { attributes.put("validationHints", getLocalContext().getExpressionParser().parseExpression(state.getValidationHints(), new FluentParserContext().evaluate(RequestContext.class))); } parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createViewState(state.getId(), flow, parseViewVariables(state.getVars()), parseActions(state.getOnEntryActions()), viewFactory, redirect, popup, parseActions(state.getOnRenderActions()), parseTransitions(state.getTransitions()), parseExceptionHandlers(state.getExceptionHandlers(), state.getTransitions()), parseActions(state.getOnExitActions()), attributes); }