jQuery reference with context relative path
Hi, I am using wicket 6.8.0. I need to use a custom jquery reference. My custom js file is in my webapp/scripts/lib folder. I cannot figure out how to create a ResourceReference base on a url like HeaderItem. *Application.init:* getJavaScriptLibrarySettings().setJQueryReference(SwtuJqueryResourceReference.get()); *HeaderItem base on a url:* JavaScriptHeaderItem.forUrl("scripts/libs/jquery-1.8.3/jquery-1.8.3.custom.min.js); If I use a UrlResourceReference, every time my page is accessed with an optional parameter, my reference to my js file don't work. Thanks Dav -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jQuery-reference-with-context-relative-path-tp4661155.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jQuery reference with context relative path
Hi, You can use : new ResourceReference() { @Override IResource getResource() {return new org.apache.wicket.request.resource.ContextRelativeResource("" scripts/libs/jquery-1.8.3/jquery-1.8.3.custom.min.js")} } On Fri, Aug 30, 2013 at 8:30 PM, divad91 wrote: > Hi, I am using wicket 6.8.0. > > I need to use a custom jquery reference. My custom js file is in my > webapp/scripts/lib folder. > I cannot figure out how to create a ResourceReference base on a url like > HeaderItem. > > *Application.init:* > > getJavaScriptLibrarySettings().setJQueryReference(SwtuJqueryResourceReference.get()); > > *HeaderItem base on a url:* > > JavaScriptHeaderItem.forUrl("scripts/libs/jquery-1.8.3/jquery-1.8.3.custom.min.js); > > If I use a UrlResourceReference, every time my page is accessed with an > optional parameter, my reference to my js file don't work. > > Thanks > Dav > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/jQuery-reference-with-context-relative-path-tp4661155.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: jQuery reference with context relative path
Thank you again, it's working ! Dav -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jQuery-reference-with-context-relative-path-tp4661155p4661180.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org