Package org.apache.tapestry

Examples of org.apache.tapestry.IActionListener


        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 testFindListenerNormal()
    {
        IActionListener cancel = newListener();
        IActionListener refresh = newListener();
        IActionListener listener = newListener();

        replayControls();

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

    public void testSuccess()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle();

        IActionListener listener = newListener();
        ListenerInvoker invoker = newInvoker();

        Object[] parameters = new Object[0];

        InvokeListener component = (InvokeListener) newInstance(InvokeListener.class, new Object[]
View Full Code Here

    public void testEnsureParametersClearedAfterException()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle();

        IActionListener listener = newListener();

        MockControl invokerc = newControl(ListenerInvoker.class);
        ListenerInvoker invoker = (ListenerInvoker) invokerc.getMock();

        Throwable t = new RuntimeException();
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

        _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

        {
            boolean current = isDescending();
            setDescending(!current);
        }

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

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

        boolean condition = getCondition(cycle, form, name);
        boolean invert = getInvert(cycle, form, name);

        // call listener
        IActionListener listener = getListener();
        if (listener != null)
            listener.actionTriggered(this, cycle);

        // render the component body only if the condition is different from the invert
        if (condition != invert) {
            String element = getElement();
           
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.