As jbrookover pointed out, there used to be two ways to enable CSS and JS. One of them is to use the <wicket:head>
tags, for example:
<wicket:head> <wicket:link> <link href="yourStylesheet.css" rel="stylesheet" type="text/css" /> </wicket:link> </wicket:head>
The second way was to include header contributors, for example:
// From v1.3; deprecated in v1.4 and removed in v1.5 add(HeaderContributor.forJavaScript(Foo.class, "yourScripts.js"));
or
// From v1.4; removed in v1.5 JavascriptPackageResource.getHeaderContribution(Foo.class, "yourScripts.js")
Actually there was a third, more complex way, which included writing a custom header contributor and the renderHead()
method. Since you are using version 1.5, the second method is not available, and you will need to select the <wicket:head>
tags or a slightly modified version of the complex method. See the Wicket wiki “Migrating to a Wicket 1.5 Page”; in particular, the three sections that begin here .
source share