not sure we support that, or want to support it...
if you are using a headercontributor in one situation, why not use it
also in your child page?
-igor

In my childpage, the head-section actually does more than just load the other javascript-file. It also does initialization for the jquery-components etc, like for example:

        $('#lang > li').hover(
                function () {
                        $(this).find('ul').removeClass('collapsed');
                },
                function () {
                        $(this).find('ul').addClass('collapsed');
                }
        );

When my webdesigner needs to add stuff like that to a subpage, he can't add it to the head, because it will be rendered before jquery etc. Then, for every page he needs to do some jquery-magick in, I need to go:

response.renderJavascriptReference(new ResourceReference(ThisSubPage.class, 
"extra-init-stuff-for-that-page.js"));

.. in that particular page. And he needs to put the js-stuff in this separate 
file instead of the head of the subpage, where it belongs.

It's OK for webdevelopers that does design/css themselves, but a real pain when 
you have designers working on your project.

Can you think of a good solution for this given the current possibilities in 
Wicket?

-- Edvin




On Feb 1, 2008 5:52 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
Hi,

I have a basepage which adds a reference to jquery amongst other things
in its constructor via add(IHeaderContributor). Then I extend that
basepage in other pages.

If I want to add another javascript-reference that utilizes jquery in
the <wicket:head> tag of the childpage, I run into trouble because the
<wicket:head> tag is rendered before the headercontributors from the
basepage, hence the code fails because jquery is not yet loaded (this
happens for many jquery-addons if they are added before jquery.js).

Is there a way to tell Wicket that wicket:head should be rendered later
than the headercontributors or something, or can I in any way change the
order of what's added to the head section?

-- Edvin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to