Hi Matias,

As Sebastien suggested you need to tell Wicket that your jQuery plugins
depend on jQuery.
The easiest way is to create JavaScriptResourceReference for each of them
by extending JQueryPluginJavaScriptResourceReference.
By just putting the links in <wicket:head> there is not enough information
for Wicket to know that they require jQuery.
For more information please also check
http://wicketinaction.com/2012/07/wicket-6-resource-management/.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jan 19, 2016 at 3:06 PM, Sebastien <[email protected]> wrote:

> Hi Matias,
>
> > Also in this page I have some JQuery plug-ins which need to be loaded
> after JQuery is loaded
>
> There is some way to control wicket:header priority, but it is probably
> better that you provide the ResourceReference, extending
> JQueryPluginResourceReference, so you are guaranteed it will be loaded
> *after* jquery
>
> Then you just have to render it like this:
>
> public void renderHead(Component component, IHeaderResponse response)
> {
>     ResourceReference reference = MyJQueryPluginResourceReference.get()
>
>     response.render(new
> PriorityHeaderItem(JavaScriptHeaderItem.forReference(reference)));
> }
>
> Hope this helps,
> Sebastien.
>

Reply via email to