Package org.apache.tapestry.listener

Examples of org.apache.tapestry.listener.ListenerMap


       
        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", "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();
        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", "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();
        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

     **/

    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()
    {try { __CLOVER_0_0.M[37]++;
        __CLOVER_0_0.S[142]++;if ((((_listeners == null) && (++__CLOVER_0_0.CT[37] != 0)) || (++__CLOVER_0_0.CF[37] == 0))){
            __CLOVER_0_0.S[143]++;_listeners = new ListenerMap(this);}

        __CLOVER_0_0.S[144]++;return _listeners;
    } finally { }}
View Full Code Here

     */

    public ListenerMap getListeners()
    {try { __CLOVER_71_0.M[3003]++;
        __CLOVER_71_0.S[12363]++;if ((((_listeners == null) && (++__CLOVER_71_0.CT[2117] != 0)) || (++__CLOVER_71_0.CF[2117] == 0))){
            __CLOVER_71_0.S[12364]++;_listeners = new ListenerMap(this);}

        __CLOVER_71_0.S[12365]++;return _listeners;
    } finally { }}
View Full Code Here

     */

    public ListenerMap getListeners()
    {try { __CLOVER_0_0.M[2853]++;
        __CLOVER_0_0.S[11757]++;if ((((_listeners == null) && (++__CLOVER_0_0.CT[2023] != 0)) || (++__CLOVER_0_0.CF[2023] == 0))){
            __CLOVER_0_0.S[11758]++;_listeners = new ListenerMap(this);}

        __CLOVER_0_0.S[11759]++;return _listeners;
    } finally { }}
View Full Code Here

     */

    public ListenerMap getListeners()
    {try { __CLOVER_0_0.M[2677]++;
        __CLOVER_0_0.S[10822]++;if ((((_listeners == null) && (++__CLOVER_0_0.CT[1875] != 0)) || (++__CLOVER_0_0.CF[1875] == 0))){
            __CLOVER_0_0.S[10823]++;_listeners = new ListenerMap(this);}

        __CLOVER_0_0.S[10824]++;return _listeners;
    } finally { }}
View Full Code Here

     */

    public ListenerMap getListeners()
    {try { __CLOVER_71_0.M[410]++;
        __CLOVER_71_0.S[1756]++;if ((((_listeners == null) && (++__CLOVER_71_0.CT[328] != 0)) || (++__CLOVER_71_0.CF[328] == 0))){
            __CLOVER_71_0.S[1757]++;_listeners = new ListenerMap(this);}

        __CLOVER_71_0.S[1758]++;return _listeners;
    } finally { }}
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.