best way to rebind events after a zone rerenders

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

best way to rebind events after a zone rerenders

Qbyte Consulting
Hi,

My zone contents are losing their client side event bindings after being
re-rendered.

Would there be a way to rerun my init modules script (imported by the page)
after a zone is again rendered?

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: best way to rebind events after a zone rerenders

rapidtransit440
I'm not in front of my computer, but what you can do is add a script to your AjaxResponseRenderer as a required dependency and it will be called Everytime your request receives a response. That's how I do it for a pop up notification


Sent from AOL Mobile Mail

On Tuesday, September 6, 2016 Qbyte Consulting <[hidden email]> wrote:
Hi,

My zone contents are losing their client side event bindings after being
re-rendered.

Would there be a way to rerun my init modules script (imported by the page)
after a zone is again rendered?

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: best way to rebind events after a zone rerenders

Dimitris Zenios
In reply to this post by Qbyte Consulting
If using tapestry 5.4 the best way is to use dom.scanner javascript module

On zone refresh dom elements are completely new so any javascript
initializations you had done has to be redone

On Tue, Sep 6, 2016 at 9:25 PM, Qbyte Consulting <[hidden email]>
wrote:

> Hi,
>
> My zone contents are losing their client side event bindings after being
> re-rendered.
>
> Would there be a way to rerun my init modules script (imported by the page)
> after a zone is again rendered?
>
> John
>
Loading...