Package org.apache.tapestry

Examples of org.apache.tapestry.IActionListener


        _formSupport.render(getMethod(), _renderInformalParameters, link);
    }

    IActionListener findListener(String mode)
    {
        IActionListener result = null;

        if (mode.equals(FormConstants.SUBMIT_CANCEL))
            result = getCancel();
        else if (mode.equals(FormConstants.SUBMIT_REFRESH))
            result = getRefresh();
View Full Code Here


        _conditionValue = evaluateCondition(cycle, form, cycleRewinding);
        _rendering = true;
       
        try {
            // call listener
            IActionListener listener = getListener();
            if (listener != null)
                listener.actionTriggered(this, cycle);
   
            // now render if condition is true
            if (_conditionValue)
            {
                String element = getElement();
View Full Code Here

    public abstract String getReceiveName();
    public abstract String getErrorName();
    public abstract boolean getDisableCaching();

  public void trigger(IRequestCycle cycle) {
        IActionListener listener = getListener();

        if (listener == null)
          throw Tapestry.createRequiredParameterException(this, "listener");

        listener.actionTriggered(this, cycle);
  }
View Full Code Here

        return (IActionListener) newMock(IActionListener.class);
    }

    public void testFindCancelListener()
    {
        IActionListener cancel = newListener();
        IActionListener listener = newListener();

        replayControls();

        Form form = (Form) newInstance(Form.class, new Object[]
        { "listener", listener, "cancel", cancel });
View Full Code Here

        verifyControls();
    }

    public void testFindCancelDefaultListener()
    {
        IActionListener listener = newListener();

        replayControls();

        Form form = (Form) newInstance(Form.class, "listener", listener);
View Full Code Here

        verifyControls();
    }

    public void testFindRefreshListener()
    {
        IActionListener refresh = newListener();
        IActionListener listener = newListener();

        replayControls();

        Form form = (Form) newInstance(Form.class, new Object[]
        { "listener", listener, "refresh", refresh });
View Full Code Here

        verifyControls();
    }

    public void testFindRefreshListenerDefault()
    {
        IActionListener listener = newListener();

        replayControls();

        Form form = (Form) newInstance(Form.class, new Object[]
        { "listener", listener });
View Full Code Here

        verifyControls();
    }

    public void testFindListenerSuccess()
    {
        IActionListener cancel = newListener();
        IActionListener refresh = newListener();
        IActionListener success = newListener();
        IActionListener listener = newListener();

        IValidationDelegate delegate = newDelegate(false);

        replayControls();
View Full Code Here

        verifyControls();
    }

    public void testFindListenerValidationErrors()
    {
        IActionListener cancel = newListener();
        IActionListener refresh = newListener();
        IActionListener success = newListener();
        IActionListener listener = newListener();

        IValidationDelegate delegate = newDelegate(true);

        replayControls();
View Full Code Here

        if (isRewinding())
        {
            String submitType = _formSupport.rewind();

            IActionListener listener = findListener(submitType);

            getListenerInvoker().invokeListener(listener, this, cycle);

            // Abort the rewind render.
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IActionListener

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.