Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-09 Thread Arunachalam Sibisakkaravarthi
I've found some problems (loading js at page level) in loading js resources in our web application. It might be the cause of loading js in the header section, we have to verify it in our app I'll create a mini application if needed. Thanks guys *Thanks And RegardsSibi.ArunachalammCruncher* On

Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Martin Grigorov
Please create a mini application demonstrating the issue and share it at GitHub. On Thu, Sep 9, 2021, 05:56 Arunachalam Sibisakkaravarthi < arunacha...@mcruncher.com> wrote: > Yes somehow It worked in 7.x > Based on the suggestions from you all, In 9.x, I use custom > IHeaderResponseDecorator >

Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Arunachalam Sibisakkaravarthi
Yes somehow It worked in 7.x Based on the suggestions from you all, In 9.x, I use custom IHeaderResponseDecorator for Css resources to load into the header section, it works. And JavaScriptFilteredIntoFooterHeaderResponse is used with a wicket-container bucket for JS resources to load into the

Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Martin Grigorov
On Wed, Sep 8, 2021 at 12:04 PM Arunachalam Sibisakkaravarthi < arunacha...@mcruncher.com> wrote: > Thanks guys for your feedback > Implementing custom IHeaderResponseDecorator for css resources works for > me. > Then I noticed that both css and js resources are loaded in the header. Is > that

Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Arunachalam Sibisakkaravarthi
Thanks guys for your feedback Implementing custom IHeaderResponseDecorator for css resources works for me. Then I noticed that both css and js resources are loaded in the header. Is that expected behaviour in Wicket 9.x? because in my previous implementation in Wicket 7.x JS loaded in the footer

Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Martin Grigorov
Hi, Instead of dealing with response decorators you could use org.apache.wicket.markup.html.IHeaderContributor getHeaderContributorListeners().add( return response -> { response.render(CssHeaderItem.forReference(css1)); response.render(CssHeaderItem.forReference(css2)); })

Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-07 Thread Francois Meillet
Hi Arunachalam, Migration From Wicket 7 to 8 setHeaderResponseDecorator(new JavaScriptToBodyCustomResponseDecorator("footer")); Wicket 8 setHeaderResponseDecorator(response -> { return new ResourceAggregator(new JavaScriptFilteredIntoFooterHeaderResponse(response, "footer")); });