I got the required JS to be rendered lower down the page (using Application#setHeaderResponseDecorator( new IHeaderResponseDecorator(){} ) , but I couldn't get the FilteredHeaderItem to be added in the <head> section of the page (only outside of the <head> element). Not too much of an issue, but what Im seeing now is that my OnDomReadyHeader items rendered at the foot of the page are firing before the Wicket click handlers are fired (which are in the <script> inside the <head> of the page).
Is this expected? I was expecting that the Wicket click handlers in <head> would execute before my script lower down the page. On Fri, Oct 31, 2014 at 11:01 AM, Nick Pratt <nbpr...@gmail.com> wrote: > > Is is possible to modify the ordering of OnDomReadyHeaderItem? I see a way to modify the JS lib ordering using IResourceSettings#setHeaderItemComparator, but that doesn't get invoked for all the click handlers and scripts added via OnDomReadyHeaderItem. I have a script that needs to be invoked after all of the Wicket click handlers etc have been executed. > > Do I have to implement a filter on FilteredHeaderItem and add my script into a separate script bucket that is ordered at the end of the <head> or in the footer?