Hello,

> Wicket 6 final won't take long.

Good to know !

> I'm not sure about the Wicket 1.5 ordering, but in Wicket 6, header items are
> rendered child-first in the component hierarchy. For every component,
> <wicket:head> is rendered first, followed by the header contributions in the
> Java code. Within a component's class hierarchy, rendering starts at the base
> class (as long as you put the super call at the top).
(...)
> You seem to be confusing class inheritance with the component hierarchy. There
> is no component hierarchy between pages, only class inhertance. Header items
> are rendered top-down in the class inheritance chain. The reason that you will
> need PriorityHeaderItem for the resource from page A, is that you contribute
> it from Java, and it will therefore end up after the wicket:head
> contributions.

Well understood for the rendering order in both cases (components 
hierarchy and class inheritance), thanks thanks to your very complete 
summary !

But one more question though : why rendering wicket:head (in the markup 
file) contributions before renderHead() (in the java file) contributions ?
Seems to me that what you'll put in wicket:head will certainly be some 
king of static code, like the css in my problem (so like this : 
.myclass{ padding: 0;} or $(document).ready(function(){ 
$("#login").focus();});). This code could need some library (JQuery for 
exemple), and you'll serve that resource using a ResourceReference so 
using renderHead() right ? If wicket:head is served before renderHead() 
then you'll have a problem...
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to