Examples of ActionSupport


Examples of com.opensymphony.xwork2.ActionSupport

    public void testEmptyValuesDoNotSetFieldErrors() throws Exception {
        conversionErrors.put("foo", 123L);
        conversionErrors.put("bar", "");
        conversionErrors.put("baz", new String[]{""});

        ActionSupport action = new ActionSupport();
        mockInvocation.expectAndReturn("getAction", action);
        stack.push(action);
        mockInvocation.matchAndReturn("getAction",action);
        assertNull(action.getFieldErrors().get("foo"));
        assertNull(action.getFieldErrors().get("bar"));
        assertNull(action.getFieldErrors().get("baz"));
        interceptor.intercept(invocation);
        assertTrue(action.hasFieldErrors());
        assertNotNull(action.getFieldErrors().get("foo"));
        assertNull(action.getFieldErrors().get("bar"));
        assertNull(action.getFieldErrors().get("baz"));
    }
View Full Code Here

Examples of org.fusesource.ide.commons.ui.actions.ActionSupport

  };

  public ContainerTableSheetPage(Fabric8Node fabric) {
    super(fabric, VIEW_ID, new ContainerTableView(VIEW_ID));
    this.fabric = fabric;
    openTerminalAction = new ActionSupport(Messages.openTerminalLabel,
        Messages.openTerminalToolTip, Fabric8JMXPlugin.getDefault()
            .getImageDescriptor("terminal_view.gif")) {
      @Override
      public void run() {
        List<Container> selectedContainers = getSelectedContainers();
        if (selectedContainers.size() > 0) {
          Container container = selectedContainers.get(0);
          if (container != null) {
            System.err.println("TODO: open terminal");
//            ContainerNode.openTerminal(getFabric(), container, null);
          }
        }
      }
    };
    startAction = new ActionSupport(Messages.StartAgentAction,
        Messages.StartAgentActionToolTip, Fabric8JMXPlugin.getDefault()
            .getImageDescriptor("start_task.gif")) {
      @Override
      public void run() {
        start();
      }
    };
    stopAction = new ActionSupport(Messages.StopAgentAction,
        Messages.StopAgentActionToolTip, Fabric8JMXPlugin.getDefault()
            .getImageDescriptor("stop_task.gif")) {
      @Override
      public void run() {
        stop();
      }
    };
    destroyAction = new ActionSupport(Messages.DestroyContainerAction,
        Messages.DestroyContainerActionToolTip, Fabric8JMXPlugin
            .getDefault().getImageDescriptor("delete.gif")) {
      @Override
      public void run() {
        destroy();
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.