Javascript must be called once at the end

2008-11-25 Thread Anton Veretennikov
Hi, JavaScript source files itself are inserted using wicket:head in CodeHighlightPanel's html. It's great that they are included only once though multiple CodeHighlightPanel's instances have it. How to make alone call script language=javascript dp.SyntaxHighlighter.HighlightAll('code');

Re: Javascript must be called once at the end

2008-11-25 Thread Jeremy Thomerson
The easiest thing would be to just add an AbstractBehavior, override renderHeader and call renderOnDomReadyJavascript(dp.SyntaxHighlighter.HighlightAll('code');); If it's the exact same string, it can be added as many times as you want and Wicket will automatically only render it once. Try this: