Package org.apache.tapestry.listener

Examples of org.apache.tapestry.listener.ListenerMap


     **/

    public ListenerMap getListeners()
    {
        if (_listeners == null)
            _listeners = new ListenerMap(this);

        return _listeners;
    }
View Full Code Here


     **/

    public ListenerMap getListeners()
    {
        if (_listeners == null)
            _listeners = new ListenerMap(this);

        return _listeners;
    }
View Full Code Here

     **/

    public ListenerMap getListeners()
    {
        if (_listeners == null)
            _listeners = new ListenerMap(this);

        return _listeners;
    }
View Full Code Here

    {
        MockControl cc = newControl(IComponent.class);
        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");
        lmc.setReturnValue(listener);

        ValueConverter vc = newValueConverter();

        Location l = newLocation();
View Full Code Here

     */

    public ListenerMap getListeners()
    {
        if (_listeners == null)
            _listeners = new ListenerMap(this);

        return _listeners;
    }
View Full Code Here

     */

    public ListenerMap getListeners()
    {
        if (_listeners == null)
            _listeners = new ListenerMap(this);

        return _listeners;
    }
View Full Code Here

        IComponent comp = newComponent();
        checkOrder(comp, false);
       
        IPage page = newMock(IPage.class);
        ListenerInvoker listenerInvoker = newMock(ListenerInvoker.class);
        ListenerMap listenerMap = newMock(ListenerMap.class);
        IActionListener listener1 = newMock(IActionListener.class);

        IComponentSpecification spec = new ComponentSpecification();
       
        Map comps = new HashMap();
        comps.put("testId", comp);
       
        Map tprops = new HashMap();
        tprops.put("id", "testId");
        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, false);
        invoker.addEventListener("testId", spec);

        expect(comp.getExtendedId()).andReturn("testId").anyTimes();
        expect(comp.getSpecification()).andReturn(spec).anyTimes();
        expect(comp.getPage()).andReturn(page);

        expect(page.getComponents()).andReturn(comps);
        expect(comp.getListeners()).andReturn(listenerMap);
       
        expect(listenerMap.getListener("fooListener")).andReturn(listener1);
       
        listenerInvoker.invokeListener(listener1, comp, cycle);
       
        replay();
       
View Full Code Here

       
        IPage page = newMock(IPage.class);
        IComponentSpecification spec = new ComponentSpecification();
       
        ListenerInvoker listenerInvoker = newMock(ListenerInvoker.class);
        ListenerMap listenerMap = newMock(ListenerMap.class);
        IActionListener listener = newMock(IActionListener.class);
       
        Map comps = new HashMap();
        comps.put("testId", comp);
       
        Map tprops = new HashMap();
        tprops.put("id", "testId");
        BrowserEvent event = new BrowserEvent("onSelect", new EventTarget(tprops));
       
        ComponentEventInvoker invoker = new ComponentEventInvoker();
        invoker.setInvoker(listenerInvoker);
       
        spec.addElementEventListener("testId", new String[] { "onSelect" },
                "fooListener", null, false, true, true);
        invoker.addEventListener("testId", spec);
       
        expect(comp.getExtendedId()).andReturn("testId").anyTimes();
        expect(comp.getSpecification()).andReturn(spec).anyTimes();
        expect(comp.getPage()).andReturn(page);
        expect(page.getComponents()).andReturn(comps);
        expect(comp.getListeners()).andReturn(listenerMap);
       
        expect(listenerMap.getListener("fooListener")).andReturn(listener);
       
        listenerInvoker.invokeListener(listener, comp, cycle);
       
        replay();
       
View Full Code Here

        checkOrder(form, false);
        FormSupport formSupport = newMock(FormSupport.class);
        IComponentSpecification spec = new ComponentSpecification();
        IValidationDelegate delegate = newMock(IValidationDelegate.class);
        ListenerInvoker listenerInvoker = newMock(ListenerInvoker.class);
        ListenerMap listenerMap = newMock(ListenerMap.class);
        IActionListener listener = newMock(IActionListener.class);
        IPage page = newMock(IPage.class);
        checkOrder(page, false);
       
        Map comps = new HashMap();
        comps.put("form1", form);
       
        Map tprops = new HashMap();
        tprops.put("id", "form1");
        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, false);
        invoker.addFormEventListener("form1", spec);
       
        expect(formSupport.getForm()).andReturn(form);
        expect(form.getExtendedId()).andReturn("form1").anyTimes();
        expect(form.getPage()).andReturn(page);

        expect(page.getComponents()).andReturn(comps);
       
        expect(form.getSpecification()).andReturn(spec);
        expect(form.getDelegate()).andReturn(delegate).anyTimes();

        delegate.clearErrors();
        expectLastCall().anyTimes();

        expect(form.getListeners()).andReturn(listenerMap);
       
        expect(listenerMap.getListener("fooListener")).andReturn(listener);
       
        form.addDeferredRunnable(isA(Runnable.class));
       
        cycle.disableFocus();
       
View Full Code Here

        FormSupport formSupport = newMock(FormSupport.class);
        IComponentSpecification spec = new ComponentSpecification();
        IValidationDelegate delegate = newMock(IValidationDelegate.class);
       
        ListenerInvoker listenerInvoker = newMock(ListenerInvoker.class);
        ListenerMap listenerMap = newMock(ListenerMap.class);
        IActionListener listener = newMock(IActionListener.class);
        IPage page = newMock(IPage.class);
        checkOrder(page, false);
       
        Map comps = new HashMap();
        comps.put("form1", form);
       
        Map tprops = new HashMap();
        tprops.put("id", "form1");
        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, false);
        invoker.addFormEventListener("form1", spec);
       
        expect(formSupport.getForm()).andReturn(form);
        expect(form.getExtendedId()).andReturn("form1").anyTimes();
        expect(form.getPage()).andReturn(page);
       
        expect(page.getComponents()).andReturn(comps);
       
        expect(form.getSpecification()).andReturn(spec);
        expect(form.getDelegate()).andReturn(delegate).anyTimes();

        delegate.clearErrors();
        expectLastCall().anyTimes();

        expect(form.getListeners()).andReturn(listenerMap);
       
        expect(listenerMap.getListener("fooListener")).andReturn(listener);
       
        form.addDeferredRunnable(isA(Runnable.class));
       
        replay();
       
View Full Code Here

TOP

Related Classes of org.apache.tapestry.listener.ListenerMap

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.