Package org.apache.tapestry

Examples of org.apache.tapestry.IActionListener


        _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


       
        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, getScheme(), getPort());
    }

    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

     *             if the component is stateful, and the session is new.
     */

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

        if (listener == null)
            throw Tapestry.createRequiredParameterException(this, "listener");
       
        getListenerInvoker().invokeListener(listener, this, cycle);
View Full Code Here

        return _invokers.containsKey(name);
    }

    public synchronized IActionListener getListener(String name)
    {
        IActionListener result = (IActionListener) _listeners.get(name);

        if (result == null)
        {
            result = createListener(name);
            _listeners.put(name, result);
View Full Code Here

           
            IComponent container = component.getContainer();
            if (container == null) // only IPage has no container
                container = component;
           
            IActionListener listener =
                container.getListeners().getListener(eventListener.getMethodName());
            _invoker.invokeListener(listener, container, cycle);
        }
    }
View Full Code Here

            EventBoundListener eventListener = (EventBoundListener)listeners.get(i);
           
            final IComponent container =
                (component.getContainer() == null) ? component : component.getContainer();
           
            final IActionListener listener =
                container.getListeners().getListener(eventListener.getMethodName());
           
            // defer execution until after form is done rewinding
            component.addDeferredRunnable(new Runnable()
            {
View Full Code Here

    void handleClick(final IRequestCycle cycle, IForm form)
    {
        if (isParameterBound("selected"))
            setSelected(getTag());

        final IActionListener listener = getListener();

        if (listener == null)
            return;

        final ListenerInvoker listenerInvoker = getListenerInvoker();
View Full Code Here

        IComponent component = (IComponent) cc.getMock();

        MockControl lmc = newControl(ListenerMap.class);
        ListenerMap lm = (ListenerMap) lmc.getMock();

        IActionListener listener = (IActionListener) newMock(IActionListener.class);

        component.getListeners();
        cc.setReturnValue(lm);

        lm.getListener("foo");
View Full Code Here

        replayControls();

        ListenerMap lm = new ListenerMapImpl(target, map);

        IActionListener l1 = lm.getListener("method");

        l1.actionTriggered(null, cycle);

        verifyControls();

        IActionListener l2 = lm.getListener("method");

        assertSame(l1, l2);
    }
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.