Hi I want to add Javascript which loads Javascript client side variables when a page loads. It would call a Javascript function and pass in server-side values.
Typically to add HTML text I would do a add(new Label(id, "Blah")); However, I want to add a Javascript function that would be enclosed in <script> tags and after the form. This Javascript is not part of the header. I've tried to add variables using the new Label(id, new Model("alert('hello');")), but the single quotes are escaped. I've looked into the following for some hints * http://www.nabble.com/legacy-javascript-integration-td8454107.html#a8460179 * http://cwiki.apache.org/WICKET/adding-javascript-from-wicket.html I know it is something to do with JavascriptTemplate. But I was hoping that someone would shed some light into how to use. The Javascript goes something like this setVariables(3¹, 1¹); Cheers Patrick