The javascript will only be included if your Ajax enabled component is included that in turn references the JS ResourceReference, otherwise it wont be.
N On Thu, Nov 14, 2013 at 7:59 AM, Marios Skounakis <msc...@gmail.com> wrote: > If I'm not mistaken this will cause JQuery to be included whenever my js > reference is included. Effectively this will cause non-ajax pages to load > javascript which applies only to ajax requests. > > What I want is the opposite: to not include my js reference when the page > does not have any ajax. > > > On Thu, Nov 14, 2013 at 2:04 PM, Sebastien <seb...@gmail.com> wrote: > > > Hi Marios, > > > > IMO the best way IMO is to make your js reference extending > > JQueryPluginResourceReference (wicket 6) > > > > Best regards, > > Sebastien. > > > > > > On Thu, Nov 14, 2013 at 12:20 PM, Marios Skounakis <msc...@gmail.com> > > wrote: > > > > > Hi all, > > > > > > I have a base page from which all my pages inherit. I want to > > conditionally > > > include a javascript reference (header item) if the page contains an > ajax > > > component. The reference is a veil implementation based on BlockUI > which > > is > > > redundant (and also causes a javascript error) if the page has not ajax > > > (and hence JQuery is not loaded). > > > > > > Any suggestions? > > > > > > Thanks > > > Marios > > > > > >