I solved it already. I added the following to the behavior: public void bind(Component component) { super.bind(component); component.add(HeaderContributor.forJavaScript(this.getClass(), "javascriptfile.js")); }
Erik. Erik van Oosten schreef: > Hello, > > I used Igor's template below for something else. Just like in the > example I add a generic javascript function to the header. > However, the function is added once for every time I add the behavior to > an component in the page. > Who knows a clean way to prevent this? > > Regards, > Erik. > > -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user