Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.RequestContext


    @Override
    @SuppressWarnings("rawtypes")
    protected String[] getRenderFragments(
            final Map model, final HttpServletRequest request, final HttpServletResponse response) {
       
        final RequestContext context = RequestContextHolder.getRequestContext();
        if (context == null) {
            return super.getRenderFragments(model, request, response);
        }
       
        final String[] fragments = (String[]) context.getFlashScope().get(View.RENDER_FRAGMENTS_ATTRIBUTE);
        if (fragments == null) {
            return super.getRenderFragments(model, request, response);
        }
        return fragments;
       
View Full Code Here


    @Override
    @SuppressWarnings("rawtypes")
    protected String[] getRenderFragments(
            final Map model, final HttpServletRequest request, final HttpServletResponse response) {
       
        final RequestContext context = RequestContextHolder.getRequestContext();
        if (context == null) {
            return super.getRenderFragments(model, request, response);
        }
       
        final String[] fragments = (String[]) context.getFlashScope().get(View.RENDER_FRAGMENTS_ATTRIBUTE);
        if (fragments == null) {
            return super.getRenderFragments(model, request, response);
        }
        return fragments;
       
View Full Code Here

public class SecurityFlowExecutionListenerTests extends TestCase {

  public void testSessionCreatingNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    FlowDefinition definition = new Flow("flow");
    listener.sessionCreating(context, definition);
  }
View Full Code Here

    listener.sessionCreating(context, definition);
  }

  public void testSessionCreatingWithSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Flow flow = new Flow("flow");
    SecurityRule rule = getSecurityRuleAnyAuthorized();
    ((LocalAttributeMap) flow.getAttributes()).put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
    configureSecurityContext();
    listener.sessionCreating(context, flow);
View Full Code Here

    listener.sessionCreating(context, flow);
  }

  public void testStateEnteringNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Flow flow = new Flow("flow");
    ViewState state = new ViewState(flow, "view", new StubViewFactory());
    listener.stateEntering(context, state);
  }
View Full Code Here

    listener.stateEntering(context, state);
  }

  public void testStateEnteringWithSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Flow flow = new Flow("flow");
    ViewState state = new ViewState(flow, "view", new StubViewFactory());
    SecurityRule rule = getSecurityRuleAllAuthorized();
    ((LocalAttributeMap) state.getAttributes()).put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
    configureSecurityContext();
View Full Code Here

    listener.stateEntering(context, state);
  }

  public void testTransitionExecutingNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Transition transition = new Transition(new DefaultTargetStateResolver("target"));
    listener.transitionExecuting(context, transition);
  }
View Full Code Here

    listener.transitionExecuting(context, transition);
  }

  public void testTransitionExecutingWithSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Transition transition = new Transition(new DefaultTargetStateResolver("target"));
    SecurityRule rule = getSecurityRuleAnyAuthorized();
    ((LocalAttributeMap) transition.getAttributes()).put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
    configureSecurityContext();
    listener.transitionExecuting(context, transition);
View Full Code Here

   * Configures EL context instances for evaluating against a Web Flow request context.
   * @author Keith Donald
   */
  private static class RequestContextELContextFactory implements ELContextFactory {
    public ELContext getELContext(Object target) {
      RequestContext context = (RequestContext) target;
      List customResolvers = new ArrayList();
      customResolvers.add(new RequestContextELResolver(context));
      customResolvers.add(new FlowResourceELResolver(context));
      customResolvers.add(new ImplicitFlowVariableELResolver(context));
      customResolvers.add(new ScopeSearchingELResolver(context));
View Full Code Here

  public Iterator getFeatureDescriptors(ELContext context, Object base) {
    return null;
  }

  public Class getType(ELContext context, Object base, Object property) {
    RequestContext requestContext = getRequestContext();
    if (base != null || requestContext == null) {
      return null;
    }
    if (ImplicitVariables.matches(property)) {
      context.setPropertyResolved(true);
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.RequestContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.