jquery HeaderContributor

36 views
Skip to first unread message

decebal

unread,
Nov 14, 2011, 8:41:34 AM11/14/11
to jqwicket-user
Hello

I want to migrate from wiquery to jqwicket but I have a problem. In
wiquery I used
add(new HeaderContributor(new CoreJavaScriptHeaderContributor())) in
BasePage to force adding jquery.js first before others js
(my_jquery.js or jquery plugins).
How can I do this with jqwicket?

Now I used
add(JavascriptPackageResource.getHeaderContribution("http://
ajax.googleapis.com/ajax/libs/jquery/1.6./jquery.min.js"));
as workaround

wicket: 1.4.18
jqwicket: 0.6

Thanks,
Decebal

moh...@fastmail.fm

unread,
Nov 14, 2011, 9:07:37 AM11/14/11
to jqwick...@googlegroups.com
Hi Decebal,

this way may help :

- go to your impl of org.apache.wicket.protocol.http.WebApplication

- override init-method

- insert this code snippet
// specific js-lib
JQContributionConfig config = new JQContributionConfig("http://ajax.googleapis.com/ajax/libs/jquery/1.6./jquery.min.js")
addPreComponentOnBeforeRenderListener(new JQComponentOnBeforeRenderListener(config));

i hope this will help you!

regards,
sascha

decebal

unread,
Nov 16, 2011, 6:29:22 AM11/16/11
to jqwicket-user
Thanks for response.

Each jqwicket version is based on a jquery version, right? In this
scenarios the flexibility to specify a jquery in JQContributionConfig
it's not dangerous?

Best regards,
Decebal

On Nov 14, 4:07 pm, "moh_...@fastmail.fm" <moh_...@fastmail.fm> wrote:
> Hi Decebal,
>
> this way may help :
>
> - go to your impl of *org.apache.wicket.protocol.http.WebApplication*
> *
> *
> *- *override* init-method
> *
> *
> *
> - insert this code snippet*
> *

moh...@fastmail.fm

unread,
Nov 17, 2011, 9:17:15 AM11/17/11
to jqwick...@googlegroups.com
Each jqwicket version is based on a jquery version, right?
correct. 

if you override the default jquery-settings you have to pay attention of course if used plugins work against your jquery version.


greetings
sascha
Reply all
Reply to author
Forward
0 new messages