You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jan Vermeulen <ja...@isencia.com> on 2007/05/02 11:28:22 UTC

Backporting from 2.0: order of calling renderHead() changed

I'm trying to port our application code from the former Wicket 2.0 to the
current trunk, and came across another difference between the two versions:

* in 2.0, HeaderContainer:renderHeaderSections() delegates to
page.renderHead(), which first calls its own render logic and afterwards
iterates its children. So the header logic of children is ALWAYS rendered
after that of its parent.
* in the trunk, HtmlHeaderContainer:renderHeaderSections() does itself first
visit all children of the page, calling the render logic of each child, and
only after that calls renderHead() on the page itself. So now the order of
calling renderHead() is: first children, than parent, but ONLY for the page.
Because visitChildren() will call renderHead() on each child before
iterating the children of that child.

Is there a reason for this ? For us, this causes a problem, because the page
adds scripts to the header, and these should be added first. 

Jan.
-- 
View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-order-of-calling-renderHead%28%29-changed-tf3679523.html#a10282695
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Re: Backporting from 2.0: order of calling renderHead() changed

Posted by Johan Compagner <jc...@gmail.com>.
I Fixed it. It has to be something that we did for 2.0 and we didn't for 1.3


On 5/2/07, Igor Vaynberg <ig...@gmail.com> wrote:
>
> open a jira issue please.
>
> -igor
>
>
> On 5/2/07, Jan Vermeulen <ja...@isencia.com> wrote:
> >
> >
> > I'm trying to port our application code from the former Wicket 2.0 to
> the
> > current trunk, and came across another difference between the two
> > versions:
> >
> > * in 2.0, HeaderContainer:renderHeaderSections() delegates to
> > page.renderHead(), which first calls its own render logic and afterwards
> > iterates its children. So the header logic of children is ALWAYS
> rendered
> > after that of its parent.
> > * in the trunk, HtmlHeaderContainer:renderHeaderSections() does itself
> > first
> > visit all children of the page, calling the render logic of each child,
> > and
> > only after that calls renderHead() on the page itself. So now the order
> of
> > calling renderHead() is: first children, than parent, but ONLY for the
> > page.
> > Because visitChildren() will call renderHead() on each child before
> > iterating the children of that child.
> >
> > Is there a reason for this ? For us, this causes a problem, because the
> > page
> > adds scripts to the header, and these should be added first.
> >
> > Jan.
> > --
> > View this message in context:
> >
> http://www.nabble.com/Backporting-from-2.0%3A-order-of-calling-renderHead%28%29-changed-tf3679523.html#a10282695
> > Sent from the Wicket - Dev mailing list archive at Nabble.com.
> >
> >
>

Re: Backporting from 2.0: order of calling renderHead() changed

Posted by Igor Vaynberg <ig...@gmail.com>.
open a jira issue please.

-igor


On 5/2/07, Jan Vermeulen <ja...@isencia.com> wrote:
>
>
> I'm trying to port our application code from the former Wicket 2.0 to the
> current trunk, and came across another difference between the two
> versions:
>
> * in 2.0, HeaderContainer:renderHeaderSections() delegates to
> page.renderHead(), which first calls its own render logic and afterwards
> iterates its children. So the header logic of children is ALWAYS rendered
> after that of its parent.
> * in the trunk, HtmlHeaderContainer:renderHeaderSections() does itself
> first
> visit all children of the page, calling the render logic of each child,
> and
> only after that calls renderHead() on the page itself. So now the order of
> calling renderHead() is: first children, than parent, but ONLY for the
> page.
> Because visitChildren() will call renderHead() on each child before
> iterating the children of that child.
>
> Is there a reason for this ? For us, this causes a problem, because the
> page
> adds scripts to the header, and these should be added first.
>
> Jan.
> --
> View this message in context:
> http://www.nabble.com/Backporting-from-2.0%3A-order-of-calling-renderHead%28%29-changed-tf3679523.html#a10282695
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>