On Thu, Jul 26, 2012 at 8:26 PM, Pierre Goiffon
<pierre.goif...@interview-efm.com> wrote:
> Le 26/07/2012 10:29, Emond Papegaaij a écrit :
>> Hi Pierre,
>
> Hi Edmond, thanks for your answer !
>
>> First of all, I strongly recommend you do not use a different
>> HeaderRenderStrategy.
>
> Yes, Martin made it very clear that ParentFirstHeaderRenderStrategy is
> deprecated.
>
>> Second, I suggest you use Wicket 6, because consistent resource ordering in
>> Wicket 1.5 is nearly impossible.
>
> Reading this made me smile : we use Wicket for a while now, and
> upgrading major versions was almost always painfull. The most difficult
> time we add was with the migration to 1.5... So I don't think just a few
> week after fixing our first version using Wicket 1.5 and still having to
> deal with bugs related to the migration, my team would agreed to upgrade
> to Wicket 6, that is still in beta stage :)
>
> For now on we dealt with the resource order problem mainly using a
> custom implementation of AbstractResourceDependentResourceReference.
>
>> HeaderResponseTest in Wicket 6 gives a good demonstration of the order of
>> resources. It shows that normal resources are rendered child-first, starting
>> at the root of the class inheritance hierarchy. If you change nothing, the
>> order will be B, C, A (A is last, because its header contribution is via
>> renderHead). To move A to the front, you wrap it in a PriorityHeaderItem, and
>> you should be done.
>
> Where can I find this HeaderResponseTest class ? I don't have it in the
> wicket-core 6.0.0-beta3 avalaible via Maven ?
> Is it this one :
> http://svn.apache.org/repos/asf/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/HeaderResponseTest.java
>
> In Wicket 1.5 if I do nothing, resources contributed in renderHead()
> would be rendered in this order : C, B, A.
> I'm surprised the order would be B, C, A in Wicket 6 ? Why so ?
>
> In my exemple I need to define 2 priorities, because the css that was in
> the B page wicket:head needs to be before the one in page C, and the css
> linked in page A must be the first resource to be rendered. Could
> PriorityHeaderItem answer this need ?
>
>> In Wicket 6, all headers are
>> rendered child-first, except PriorityHeaderItems, which are rendered parent-
>> first.
>
> I see that in the PriorityHeaderItem Javadoc. Does that means if I add a
> PriorityHeaderItem in page A, and another in page B, the one in page A
> (parent page) will be rendered before page B (child page) ?
>
>
> Another question : can you confirm me there are no equivalent in Wicket
> 1.5 for the Wicket 6 CssContentHeaderItem ? Said otherwise, in Wicket
> 1.5 can I serve content in java directly in the head ? I don't want
> every css contributions to be added with link tags and makes the
> browsers do one more download...

https://github.com/apache/wicket/blob/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/internal/HeaderResponse.java#L59

> ---------------------------------------------------------------------
> 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