Examples of ActionComponent


Examples of com.sardak.antform.interfaces.ActionComponent

    actionComponents.put(component.getComponent(), component);
    component.getComponent().addActionListener(this);
  }

  public void actionPerformed(ActionEvent e) {
    ActionComponent source = (ActionComponent) actionComponents.get(e.getSource());
    if (source == null) {
      throw new BuildException("Received event from unknown source.");
    }
    if (source.getActionType() == ActionType.OK) {
      // check required components
      if (!task.requiredStatusOk()) {
        return;
      }
      // notify components
      task.ok();
      // close form (unless background) and run target (if set and valid)
      runTarget(source);
    } else if (source.getActionType() == ActionType.CANCEL) {
      // notify components
      task.cancel();
      // close form (unless background) and run target (if set and valid)
      runTarget(source);
    } else if (source.getActionType() == ActionType.RESET) {
      // reset form properties
      task.reset();
    }
  }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

    public String getBeanName() {
        return "action";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new ActionComponent(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

    protected boolean ignoreContextParams;
    protected boolean flush = true;
    protected boolean rethrowException;

    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new ActionComponent(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

    }

    protected void populateParams() {
        super.populateParams();

        ActionComponent action = (ActionComponent) component;
        action.setName(name);
        action.setNamespace(namespace);
        action.setExecuteResult(executeResult);
        action.setIgnoreContextParams(ignoreContextParams);
        action.setFlush(flush);
        action.setRethrowException(rethrowException);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

        action.setFlush(flush);
        action.setRethrowException(rethrowException);
    }

    protected void addParameter(String name, Object value) {
        ActionComponent ac = (ActionComponent) component;
        ac.addParameter(name, value);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

    public ActionModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new ActionComponent(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

    public ActionModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new ActionComponent(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

    public String getBeanName() {
        return "action";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new ActionComponent(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

        tag.setName(TestConfigurationProvider.TEST_NAMESPACE_ACTION);
        tag.setId(TestConfigurationProvider.TEST_NAMESPACE_ACTION);

        try {
            tag.doStartTag();
            ActionComponent ac = ((ActionComponent) tag.component);
            tag.doEndTag();
            ActionProxy proxy = ac.getProxy();

            Object o = pageContext.findAttribute(TestConfigurationProvider.TEST_NAMESPACE_ACTION);
            assertTrue(o instanceof TestAction);

            assertEquals(TestConfigurationProvider.TEST_NAMESPACE, proxy.getNamespace());
View Full Code Here

Examples of org.apache.struts2.components.ActionComponent

        tag.setExecuteResult(true);

        tag.doStartTag();

        // tag clear components on doEndTag
        ActionComponent component = (ActionComponent) tag.getComponent();

        tag.doEndTag();

        TestActionTagResult result = (TestActionTagResult) component.getProxy().getInvocation().getResult();

        assertTrue(stack.getContext().containsKey(ServletActionContext.PAGE_CONTEXT));
        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT)instanceof PageContext);
        assertTrue(result.isExecuted());
    }
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.