Hi Pierre,

There are some improvements in this area in Wicket 6.
Please read http://wicketinaction.com/2012/07/wicket-6-resource-management/
for more information. Pay attention to PriorityHeaderItem and setting
custom header item comparator. Header contributions from <wicket:head>
are represented with org.apache.wicket.markup.head.PageHeaderItem.

On Mon, Jul 9, 2012 at 5:16 PM, Pierre Goiffon
<pierre.goif...@interview-efm.com> wrote:
> Hi,
>
> We recently upgrade to Wicket 1.5. One of the major concern during that
> migration was to deal with the new order of the header render strategy.
> I see this is defined in AbstractHeaderRenderStrategy#get(), and reading
> https://issues.apache.org/jira/browse/WICKET-4000 I understand the
> reason of this choice : to be able to replace a parent contribution.
>
> But this is a big problem when you deal with css, because in your
> supages / panels / components you will insert specific properties that
> are meant to override global ones defined in the page... and to do so
> the css properties in the subpage / panel / component must be inserted
> in the head AFTER the page css declaration.
>
> For exemple I am just dealing with a problem in a page hierarchy like
> the one below :
> pageA : adds mycss.css using renderHead and a ResourceReference
> pageB : adds 6 lines of css to change the behavior in wicket:head
> pageC : adds 1 line of css to override a margin in wicket:head
>
> The only solution I see with wicket 1.5 is to create css files for the
> properties in page B and page C and adds them in each renderHead() using
> an implementation of AbstractResourceDependentResourceReference.
> This is just a nightmare, and impacts also the user (3 css files to
> download instead of 1 !).
>
> Are there any mean to do better ?
> If not, as I think we need both to render in the header before or after
> the parent, maybe there should be a method for each order ? Like
> renderHeadBefore() / renderHeadAfter() ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to