Examples of IActionListener


Examples of org.apache.tapestry.IActionListener

        // A listener is not always necessary ... it's easy to code
        // the synchronization as a side-effect of the accessor method.

        setValue(value);

        IActionListener listener = getListener();

        if (listener != null)
            listener.actionTriggered(this, cycle);
    }
View Full Code Here

Examples of org.apache.tapestry.IActionListener

        if (i == null)
            return;

        int index = 0;

        IActionListener listener = getListener();
        String element = getElement();

        while (i.hasNext())
        {
            Object value = null;

            if (indexBound)
                setIndex(index++);

            if (cycleRewinding)
                value = convertValue((String) i.next());
            else
            {
                value = i.next();
                writeValue(form, name, value);
            }

            setValue(value);

            if (listener != null)
                listener.actionTriggered(this, cycle);

            if (element != null)
            {
                writer.begin(element);
                renderInformalParameters(writer, cycle);
View Full Code Here

Examples of org.apache.tapestry.IActionListener

        String name = form.getElementId(this);

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

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

        // render the component body only if the condition is true
        if (condition)
        {
            String element = getElement();
View Full Code Here

Examples of org.apache.tapestry.IActionListener

                throw new StaleLinkException(FormMessages.formTooFewIds(this, expected
                        - _allocatedIdIndex, nextExpectedId), this);
            }

            IActionListener listener = getListener();

            if (listener != null)
                listener.actionTriggered(this, cycle);

            // Abort the rewind render.

            throw new RenderRewoundException(this);
        }
View Full Code Here

Examples of org.apache.tapestry.IActionListener

            IBinding selectedBinding = getBinding("selected");

            if (selectedBinding != null)
                selectedBinding.setObject(getTag());

            IActionListener listener = getListener();

            if (listener != null)
                listener.actionTriggered(this, cycle);

            return;
        }

        // Not rewinding, do the real render
View Full Code Here

Examples of org.apache.tapestry.IActionListener

            IBinding selectedBinding = getBinding("selected");

            if (selectedBinding != null)
                selectedBinding.setObject(getTag());

            IActionListener listener = getListener();

            if (listener != null)
                listener.actionTriggered(this, cycle);

            return;
        }

        writer.beginEmpty("input");
View Full Code Here

Examples of org.apache.tapestry.IActionListener

                if (value != null && value.equals(name))
                {
                    IBinding selectedBinding = getBinding("selected");
                    if (selectedBinding != null)
                        selectedBinding.setObject(getTag());
                    IActionListener listener = getListener();
                    if (listener != null)
                        listener.actionTriggered(this, cycle);
                }
            }

            writer.begin("a");
            writer.attribute("href", "javascript:submitLink(document." + formName + ",\"" + name
View Full Code Here

Examples of org.apache.tapestry.IActionListener

        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

Examples of org.apache.tapestry.IActionListener

        replay();

        ListenerMap lm = new ListenerMapImpl(target, map);

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

        l1.actionTriggered(null, cycle);

        verify();

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

        assertSame(l1, l2);
    }
View Full Code Here

Examples of org.apache.tapestry.IActionListener

    private void attempt(String methodName, Listener listener, ListenerMap map)
    {
        int count = listener.invokeCount;

        IActionListener l = (IActionListener) map.getListener(methodName);

        assertNotNull(l);

        try
        {
            l.actionTriggered(null, null);
        }
        catch (ApplicationRuntimeException ex)
        {
            throw new AssertionFailedError("Unexpected ApplicationRuntimeException.");
        }
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.