There was a bug in tapestry-jquery not too long ago that wasn't processing
the scripts on ajax events - make sure that you're on the latest
tapestry-jquery version.

Cheers - Alex K

On Mon, Nov 5, 2012 at 9:28 AM, nquirynen <nat...@pensionarchitects.be>wrote:

> I think I found it:
>
> *$.tapestry.utils.loadScriptsInReply(r);*
>
> I put this in the ajax request callback function and looks like its working
> now. So now my Test page code looks like:
>
> public class Test {
>
>         @Inject
>         private ComponentResources componentResources;
>
>         @Inject
>         private AjaxResponseRenderer ajaxResponseRenderer;
>
>         @Inject
>         private JavaScriptSupport javaScriptSupport;
>
>         public String getEventLink() {
>                 return componentResources.createEventLink("alert").toURI();
>         }
>
>         @BeginRender
>         void beginRender() {
>                 javaScriptSupport.addScript("$.get('%s',
> function(r){$.tapestry.utils.loadScriptsInReply(r);});", getEventLink());
>         }
>
>         void onAlert() {
>                 ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>
>                         @Override
>                         public void run(JavaScriptSupport
> javascriptSupport) {
>
> javascriptSupport.addScript("window.alert('test');");
>                         }
>                 });
>         }
> }
>
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/ajaxResponseRenderer-in-event-tp5717654p5717659.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to