On Monday 30 July 2012 18:18:46 Pierre Goiffon wrote: > 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...
With these things you just have to make a decision. Both orders are equally valid. You use wicket:head for minor adjustments in styling, others use wicket:head to contribute the css files and do the adjustments in renderHead. The idea was, that with this order, it is always possible to override any static wicket:head contribution from the Java code. Personally, I try to avoid wicket:head as much as possible and render everything from renderHead. This gives you the most flexibility. Best regards, Emond --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org