Re: Preload js after block update

2012-09-21 Thread Thiago H de Paula Figueiredo
On Fri, 21 Sep 2012 05:54:27 -0300, rosecorp wrote: Thank you Ivan, that suggestion is very useful, I will try to refactor my solutions this night. Thanks a lot! Ivan suggested exactly the same solution as me, but with a better explanation. Thanks Ivan! :) -- Thiago H. de Paula Figueire

Re: Preload js after block update

2012-09-21 Thread Ivan Khalopik
If you need to load all scripts when page is loaded just place @Import annotation to your page java class. There is no way to make it dynamicly as components placed in block are not rendered and as result doesn't add their scripts to page. You need to specify all scripts explicitly. Or you can try

Re: Preload js after block update

2012-09-21 Thread rosecorp
Hi Thiago, Maybe I wasn't clear in my first post. I will paraphrase my problem. I am using tapestry5-jquery and there is a use case where I load page with 3 different options to choose which are event links and then I handle it in java code to render particular block. The problem is that one of t

Re: Preload js after block update

2012-09-20 Thread Thiago H de Paula Figueiredo
On Thu, 20 Sep 2012 18:18:13 -0300, rosecorp wrote: Hi Guys, Hi! I have a block element in tml which contains other components with heavy js content. Is it possible to pre-load those java script files before zone update? Why don't you just use @Import to load these JavaScript files?