You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Markus Joschko <ma...@gmail.com> on 2007/01/02 20:50:48 UTC

Eventlistener question

Hi all,
I have a page in which a Eventlistener is defined.
As the event occurs a component is added programmatically to the
updatelist (in the listener) and the response is rendered.
In the response there is always the initialization part of the
Eventlistener included. Is there something I need to do to suppress
this as it is only necessary once?

<ajax-response><response id="initializationscript" type="script"><script>
//<![CDATA[
tapestry.cleanConnect(dojo.byId("testDiv"), "onclick", "event1260827384");
...

Thanks,
 Markus

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


Re: Eventlistener question

Posted by Jesse Kuhnert <jk...@gmail.com>.
It's necessary because of the slew of nightmares associated with
preventing memory leaks on the client side as well as not knowing
which actual dom nodes do and do not exist(in the browser) already for
each request.

There's no other way to know without some sort of state knowledge,
which would probably be horribly bad wrt performance / memory .
(somehow...maybe not)

On 1/2/07, Markus Joschko <ma...@gmail.com> wrote:
> Hi all,
> I have a page in which a Eventlistener is defined.
> As the event occurs a component is added programmatically to the
> updatelist (in the listener) and the response is rendered.
> In the response there is always the initialization part of the
> Eventlistener included. Is there something I need to do to suppress
> this as it is only necessary once?
>
> <ajax-response><response id="initializationscript" type="script"><script>
> //<![CDATA[
> tapestry.cleanConnect(dojo.byId("testDiv"), "onclick", "event1260827384");
> ...
>
> Thanks,
>  Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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