Examples of RenderingViewAdapter


Examples of org.strecks.view.RenderingViewAdapter

  @Test
  public void testHandleViewRenderingAdapter() throws Exception
  {

    RenderingViewAdapter viewAdapter = createStrictMock(RenderingViewAdapter.class);
    ControllerAction action = createStrictMock(ControllerAction.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
    TestAction actionBean = createStrictMock(TestAction.class);
    ActionBeanSource beanSource = createStrictMock(ActionBeanSource.class);

    ActionContext actionContext = new TestContextImpl(request);

    // check the expected order of method invocation
    expect(action.getBeanSource()).andReturn(beanSource);
    expect(beanSource.createBean(actionContext)).andReturn(actionBean);
    action.preExecute(actionBean, actionContext);

    expect(action.getBeforeInterceptors()).andReturn(null);
    expect(action.executeController(actionBean, actionContext)).andReturn(viewAdapter);
    expect(action.getAfterInterceptors()).andReturn(null);

    request.setAttribute(InfrastructureKeys.ACTION_BEAN, actionBean);
    action.postExecute(actionBean, actionContext, null);
    viewAdapter.render(actionContext);

    replay(action);
    replay(request);
    replay(actionBean);
    replay(beanSource);
View Full Code Here

Examples of org.strecks.view.RenderingViewAdapter

        request.setAttribute(InfrastructureKeys.ACTION_FORWARD, actionForward);
        return actionForward;
      }
      else if (viewAdapter instanceof RenderingViewAdapter)
      {
        RenderingViewAdapter va = (RenderingViewAdapter) viewAdapter;
        va.render(context);
      }
    }
    return null;

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.