How to call Javscript after AJAX update – Wicket
Written on
April 17, 2009 at 5:23 pm by
mkyong
According to this Apache Wicket article. If we want to run a certain piece of Javascript code after every Ajax update, we can include the following Javascript code into our html code
wicketGlobalPostCallHandler = function { alert('successful partial update'); }
You may try above solution, but “wicketGlobalPostCallHandler” solution just does not work for me. I find another more easy way to execute my Javascript after Ajax update in Wicket. Here is the code
ajaxRequestTarget.appendJavascript("alert('hello');");
By using appendJavascript method in ajaxRequestTarget class, i can easily call my Javascript after every Ajax update in Wicket.

