Examples of IActionListener


Examples of org.apache.tapestry.IActionListener

    public void testInvokeAndThrow() throws Exception
    {
        Listener l = new ListenerSubclass();
        ListenerMap m = new ListenerMap(l);
        IActionListener listener = (IActionListener) m.getListener("invokeAndThrow");

        try
        {
            listener.actionTriggered(null, null);

            throw new AssertionFailedError("Unreachable.");
        }
        catch (ApplicationRuntimeException ex)
        {
View Full Code Here

Examples of org.apache.tapestry.IActionListener

    public void testInvokeAndThrowRuntime() throws Exception
    {
        Listener l = new ListenerSubclass();
        ListenerMap m = new ListenerMap(l);
        IActionListener listener = (IActionListener) m.getListener("invokeAndThrowRuntime");

        try
        {
            listener.actionTriggered(null, null);

            throw new AssertionFailedError("Unreachable.");
        }
        catch (ApplicationRuntimeException ex)
        {
View Full Code Here

Examples of org.apache.tapestry.IActionListener

    public void testToString() throws Exception
    {
        Listener l = new Listener();
        ListenerMap m = new ListenerMap(l);

        IActionListener listener = (IActionListener) m.getListener("actualListenerMethod");

        assertEquals(
                "ToString",
                "SyntheticListener[TestListenerMap.Listener[0] public void org.apache.tapestry.junit.TestListenerMap$Listener.actualListenerMethod(org.apache.tapestry.IRequestCycle)]",
                listener.toString());

        assertEquals("ToString", "ListenerMap[TestListenerMap.Listener[0]]", m.toString());
    }
View Full Code Here

Examples of org.apache.tapestry.IActionListener

    public void testIsCached() throws Exception
    {
        Listener l = new Listener();
        ListenerMap m = new ListenerMap(l);

        IActionListener listener = (IActionListener) m.getListener("actualListenerMethod");

        assertSame("Listener", listener, m.getListener("actualListenerMethod"));
    }
View Full Code Here

Examples of org.apache.tapestry.IActionListener

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

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

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

Examples of org.apache.tapestry.IActionListener

     * If the listener parameter is not bound, attempt to locate an implicit
     * listener named by the capitalized component id, prefixed by "do".
     */
    public void trigger(IRequestCycle cycle)
    {
        IActionListener listener = getListener();
        if (listener == null)
            listener = getContainer().getListeners().getImplicitListener(this);

        Object[] params = cycle.getListenerParameters();

View Full Code Here

Examples of org.apache.tapestry.IActionListener

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

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

        if (listener == null)
          listener = getContainer().getListeners().getImplicitListener(this);

        getListenerInvoker().invokeListener(listener, this, cycle);
View Full Code Here

Examples of org.apache.tapestry.IActionListener

     *
     **/

    public void trigger(IRequestCycle cycle)
    {
        IActionListener listener = getListener();
       
        if (listener == null)
          throw Tapestry.createRequiredParameterException(this, "listener");

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

Examples of org.apache.tapestry.IActionListener

        verifyControls();
    }

    public void testTriggerWithListener()
    {
        IActionListener listener = newListener();
        IForm form = newForm();
        IRequestCycle cycle = newCycle();

        Creator creator = new Creator();
        Submit submit = (Submit) creator.newInstance(Submit.class, new Object[]
        { "listener", listener, "listenerInvoker", new ListenerInvokerTerminator() });

        listener.actionTriggered(submit, cycle);

        replayControls();

        submit.handleClick(cycle, form);
View Full Code Here

Examples of org.apache.tapestry.IActionListener

        verifyControls();
    }

    public void testTriggerWithDeferredListener()
    {
        IActionListener listener = newListener();
        MockForm form = new MockForm();
        IRequestCycle cycle = newCycle();

        Creator creator = new Creator();
        Submit submit = (Submit) creator.newInstance(Submit.class, new Object[]
        { "listener", listener, "defer", Boolean.TRUE, "listenerInvoker",
                new ListenerInvokerTerminator() });

        replayControls();

        submit.handleClick(cycle, form);

        verifyControls();

        listener.actionTriggered(submit, cycle);

        replayControls();

        form.runDeferred();
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.