Package org.springframework.webflow.action

Examples of org.springframework.webflow.action.AbstractAction


  public void testStateExceptionHandlingExceptionInEndState() {
    FlowBuilder builder = new AbstractFlowBuilder() {
      public void buildStates() throws FlowBuilderException {
        State state = new EndState(getFlow(), "end");
        state.getEntryActionList().add(new AbstractAction() {
          protected Event doExecute(RequestContext context) throws Exception {
            throw new NullPointerException("failing");
          }
        });
        new TransitionableState(getFlow(), "showError") {
View Full Code Here


  public void testStateExceptionHandlingExceptionInEndState() {
    FlowBuilder builder = new AbstractFlowBuilder() {
      public void buildStates() throws FlowBuilderException {
        State state = new EndState(getFlow(), "end");
        state.getEntryActionList().add(new AbstractAction() {
          protected Event doExecute(RequestContext context) throws Exception {
            throw new NullPointerException("failing");
          }
        });
        new TransitionableState(getFlow(), "showError") {
View Full Code Here

    assertEquals("success", action.execute(context).getId());
  }

  public void testExecuteWithCustomAttribute() throws Exception {
    action.getAttributes().put("attr", "value");
    action.setTargetAction(new AbstractAction() {
      protected Event doExecute(RequestContext context) throws Exception {
        assertEquals("value", context.getAttributes().getString("attr"));
        return success();
      }
    });
View Full Code Here

  public void testExecuteWithChainOfCustomAttributes() throws Exception {
    AnnotatedAction action2 = new AnnotatedAction(action);
    action2.getAttributes().put("attr2", "value");
    action.getAttributes().put("attr", "value");
    action.setTargetAction(new AbstractAction() {
      protected Event doExecute(RequestContext context) throws Exception {
        assertEquals("value", context.getAttributes().getString("attr"));
        assertEquals("value", context.getAttributes().getString("attr2"));
        return success();
      }
View Full Code Here

    assertEquals(0, context.getAttributes().size());
  }

  public void testExecuteWithName() throws Exception {
    action.getAttributes().put("name", "foo");
    action.setTargetAction(new AbstractAction() {
      protected Event doExecute(RequestContext context) throws Exception {
        assertEquals("foo", context.getAttributes().getString("name"));
        return success();
      }
    });
View Full Code Here

TOP

Related Classes of org.springframework.webflow.action.AbstractAction

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.