You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by divad91 <di...@hotmail.com> on 2013/08/30 19:30:51 UTC
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jQuery reference with context relative path
Posted by divad91 <di...@hotmail.com>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jQuery reference with context relative path
Posted by Martin Grigorov <mg...@apache.org>.
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 <di...@hotmail.com> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>