Examples of FormAction


Examples of org.joget.apps.form.model.FormAction

        FormData updatedFormData = formData;
        if (element == null) {
            element = form;
        }
        if (element instanceof FormAction) {
            FormAction action = (FormAction) element;
            if (action != null) {
                boolean isActive = action.isActive(form, formData);
                if (isActive) {
                    updatedFormData = action.actionPerformed(form, formData);
                }
            }
        }
        // recurse into children
        Collection<Element> children = element.getChildren(formData);
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

  }

  public void testResolveMultiAction() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction());
    context.getRootFlow().setApplicationContext(ac);
    Expression exp = parser.parseExpression("multiAction.setupForm", new FluentParserContext()
        .evaluate(RequestContext.class));
    AnnotatedAction action = (AnnotatedAction) exp.getValue(context);
    assertSame(ac.getBean("multiAction"), action.getTargetAction());
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

  public void testResolveSpringBean() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("testBean", new TestBean());
    ac.getBeanFactory().registerSingleton("action", new TestAction());
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction(TestBean.class));
    context.getRootFlow().setApplicationContext(ac);
    context.getConversationScope().put("foo", "bar");
    Expression exp = parser.parseExpression("foo", new FluentParserContext().evaluate(RequestContext.class));
    assertEquals("bar", exp.getValue(context));
  }
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

  }

  public void testResolveMultiAction() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction());
    context.getRootFlow().setApplicationContext(ac);
    Expression exp = parser.parseExpression("multiAction.setupForm", new FluentParserContext()
        .evaluate(RequestContext.class));
    AnnotatedAction action = (AnnotatedAction) exp.getValue(context);
    assertSame(ac.getBean("multiAction"), action.getTargetAction());
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

          assertNull(result);
        }
      }
    }));
    FlowExecution execution = factory.createFlowExecution(flow);
    FormAction action = (FormAction) flow.getApplicationContext().getBean("formAction");
    assertFalse(((TestBeanValidator) action.getValidator()).getInvoked());
    execution.start(null, new MockExternalContext());
    MockExternalContext context = new MockExternalContext();
    context.setEventId("submit");
    execution.resume(context);
    assertTrue(((TestBeanValidator) action.getValidator()).getInvoked());
  }
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

          assertNull(result);
        }
      }
    }));
    FlowExecution execution = factory.createFlowExecution(flow);
    FormAction action = (FormAction) flow.getApplicationContext().getBean("formAction");
    assertFalse(((TestBeanValidator) action.getValidator()).getInvoked());
    execution.start(null, new MockExternalContext());
    MockExternalContext context = new MockExternalContext();
    context.setEventId("submit");
    execution.resume(context);
    assertTrue(((TestBeanValidator) action.getValidator()).getInvoked());
  }
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

  }

  public void testResolveMultiAction() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction());
    context.getRootFlow().setApplicationContext(ac);
    Expression exp = parser.parseExpression("multiAction.setupForm",
        new FluentParserContext().evaluate(RequestContext.class));
    AnnotatedAction action = (AnnotatedAction) exp.getValue(context);
    assertSame(ac.getBean("multiAction"), action.getTargetAction());
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

  public void testResolveSpringBean() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("testBean", new TestBean());
    ac.getBeanFactory().registerSingleton("action", new TestAction());
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction(TestBean.class));
    context.getRootFlow().setApplicationContext(ac);
    context.getConversationScope().put("foo", "bar");
    Expression exp = parser.parseExpression("foo", new FluentParserContext().evaluate(RequestContext.class));
    assertEquals("bar", exp.getValue(context));
  }
View Full Code Here

Examples of org.springframework.webflow.action.FormAction

  }

  public void testResolveMultiAction() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction());
    context.getRootFlow().setApplicationContext(ac);
    Expression exp = parser.parseExpression("multiAction.setupForm",
        new FluentParserContext().evaluate(RequestContext.class));
    AnnotatedAction action = (AnnotatedAction) exp.getValue(context);
    assertSame(ac.getBean("multiAction"), action.getTargetAction());
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.