jQWicket generating relative Url's

38 views
Skip to first unread message

anant

unread,
Nov 14, 2011, 4:04:40 AM11/14/11
to jqwicket-user
Hi
I am initiazing jqWicket using
super.getComponentPreOnBeforeRenderListeners().add(new
JQComponentOnBeforeRenderListener(
new JQContributionConfig().withDefaultJQueryUi()));

in my WebApplication class.

It is generating a relative url so it can not find the files

the generated Url's are like:
http://localhost:8080/http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js
Is there a work around or a fix?
I did try entering my own url but that generated a relative URL as well

m...@javaforge.net

unread,
Nov 14, 2011, 7:34:49 AM11/14/11
to jqwick...@googlegroups.com
Hi,

we currently investigating this problem.
See: http://code.google.com/p/jqwicket/issues/detail?id=23

Please subscribe to this issue.

Fernando Sproviero

unread,
Nov 14, 2011, 7:34:55 AM11/14/11
to jqwick...@googlegroups.com
Hi,

I'm doing the following in the init method of my WicketApplication:

    public void init() {
        super.init();
        addComponentInstantiationListener(new SpringComponentInjector(this));

        JQContributionConfig config = new JQContributionConfig("/js/jquery-1.5.1.min.js")
        .withJQueryUiJs("/js/jquery-ui-1.8.12.custom.min.js")
        .withJQueryUiCss("/css/south-street/jquery-ui-1.8.12.custom.css");

        addPreComponentOnBeforeRenderListener(new JQComponentOnBeforeRenderListener(config));

   }


If you don't want to use local files then, you should replace the config variable with the following:

        JQContributionConfig config = new JQContributionConfig("https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js")
            .withJQueryUiJs("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js")
            .withJQueryUiCss("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/themes/south-street/jquery-ui.css");

Thanks.

Fernando Sproviero

unread,
Nov 14, 2011, 7:37:38 AM11/14/11
to jqwick...@googlegroups.com
Forgot to mention, I'm using jqwicket 0.4.
Reply all
Reply to author
Forward
0 new messages