Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.ComponentSpecification.addEventListener()


        BrowserEvent event = new BrowserEvent("onSelect", "form1", new EventTarget(tprops));
       
        ComponentEventInvoker invoker = new ComponentEventInvoker();
        invoker.setInvoker(listenerInvoker);
       
        spec.addEventListener("form1", new String[] { "onSelect" }, "fooListener",
                "form1", false, false, false, false);
        invoker.addFormEventListener("form1", spec);
       
        expect(formSupport.getForm()).andReturn(form);
        expect(form.getExtendedId()).andReturn("form1").anyTimes();
View Full Code Here


        BrowserEvent event = new BrowserEvent("onSelect", "form1", new EventTarget(tprops));
       
        ComponentEventInvoker invoker = new ComponentEventInvoker();
        invoker.setInvoker(listenerInvoker);
       
        spec.addEventListener("form1", new String[] { "onSelect" }, "fooListener",
                "form1", false, false, true, false);
        invoker.addFormEventListener("form1", spec);
       
        expect(formSupport.getForm()).andReturn(form);
        expect(form.getExtendedId()).andReturn("form1").anyTimes();
View Full Code Here

public class TestEventConnectionVisitor extends BaseComponentTestCase {

    public void test_Wire_Component_Event()
    {
        IComponentSpecification spec = new ComponentSpecification();
        spec.addEventListener("comp1", new String[] {"onClick"}, "testFoo", null, false, false, false, false);

        IComponent comp = newComponent(spec, "comp1", "path/");
        IComponentEventInvoker invoker = newMock(IComponentEventInvoker.class);

        invoker.addEventListener("path/comp1", spec);
View Full Code Here

        assertEquals(0, worker.getDefferedFormConnections().size());
       
        // test widget render
       
        invoker.addEventListener("wid1", widgetSpec);
        widgetSpec.addEventListener("wid1", new String[] {"onclick"}, "testMethod", null, false, true, false);
       
        checkOrder(cycle, false);
        expect(cycle.isRewinding()).andReturn(false);
       
        expect(cycle.getAttribute(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE))
View Full Code Here

        IDirectEvent component = newMock(IDirectEvent.class);
        IComponentSpecification spec = new ComponentSpecification();
       
        // now test render
        invoker.addEventListener("comp1", spec);
        spec.addEventListener("comp1", new String[] {"onclick"}, "testMethod", "form1", true, false, false);
       
        expect(cycle.isRewinding()).andReturn(false);
       
        expect(cycle.getAttribute(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE)).andReturn(prs);
       
View Full Code Here

        IDirectEvent component = newMock(IDirectEvent.class);
        IComponentSpecification spec = new ComponentSpecification();
       
        // now test render
        invoker.addEventListener("comp1", spec);
        spec.addEventListener("comp1", new String[] {"onclick"}, "testMethod", "form1", false, false, false);
       
        expect(cycle.isRewinding()).andReturn(false);
       
        expect(cycle.getAttribute(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE)).andReturn(prs);
       
View Full Code Here

{
   
    public void test_Event_Properties()
    {
        IComponentSpecification spec = new ComponentSpecification();
        spec.addEventListener("comp1", new String[] {"onClick"}, "testFoo",
                null, false, false, false);
       
        assertTrue(spec.hasEvents("comp1"));
       
        ComponentEventProperty prop = spec.getComponentEvents("comp1");
View Full Code Here

        BrowserEvent event = new BrowserEvent("onSelect", new EventTarget(tprops));
       
        ComponentEventInvoker invoker = new ComponentEventInvoker();
        invoker.setInvoker(listenerInvoker);
       
        spec.addEventListener("testId", new String[] { "onSelect" },
                "fooListener", null, false, false, false);
        invoker.addEventListener("testId", spec);
       
        expect(comp.getId()).andReturn("testId").anyTimes();
       
View Full Code Here

        BrowserEvent event = new BrowserEvent("onSelect", new EventTarget(tprops));
       
        ComponentEventInvoker invoker = new ComponentEventInvoker();
        invoker.setInvoker(listenerInvoker);
       
        spec.addEventListener("form1", new String[] { "onSelect" }, "fooListener",
                "form1", false, false, false);
        invoker.addFormEventListener("form1", spec);
       
        expect(formSupport.getForm()).andReturn(form);
       
View Full Code Here

        BrowserEvent event = new BrowserEvent("onSelect", new EventTarget(tprops));
       
        ComponentEventInvoker invoker = new ComponentEventInvoker();
        invoker.setInvoker(listenerInvoker);
       
        spec.addEventListener("form1", new String[] { "onSelect" }, "fooListener",
                "form1", false, false, true);
        invoker.addFormEventListener("form1", spec);
       
        expect(formSupport.getForm()).andReturn(form);
       
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.