You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Robert Binna <r....@synedra.com> on 2007/01/23 20:59:50 UTC

Strange behaviour on adding @EventListener

Hi

I am just playing around with @EventListener annotation. All works 
perfect except when I am starting to use @EventListener on different pages.

If I have page A
    and an EventListener on component C with id "one"
and I have a page B
    and and EventListener on component C with id "one"

than I get NullPointerExceptions when the event is triggered.

If I have page A
    and an EventListener on component C with id "one"
and I have a page B
    and and EventListener on component C with id "two"

it works fine except that, the following lines are added to the 
initalization section of the javascript:

    tapestry.cleanConnect(dojo.byId("one"), "eventName", "event2063166248");
    ....
    dojo.event.connect(dojo.byId("one"), "eventName", tapestry, "event636807493");

    tapestry.cleanConnect(dojo.byId("two"), "nodeClicked", "event2063166248");
    ...
    dojo.event.connect(dojo.byId("two"), "eventName", tapestry, "event2063166248");

The problem is that this is the case if we are on page A or on page B, evnthough "one" is only defined in A and "two" only defined in B.

I hope that someone can give me a hint, what I am doin wrong.

Additionally my configuration: latest tapestry-4.1.2-SNAPSHOT on 
jetty-6.0.2 on linux on jdk 1.5.0_04.

Kind regards,
            Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org