Search in sources :

Example 1 with JavaScriptFilteredIntoFooterHeaderResponse

use of org.apache.wicket.markup.head.filter.JavaScriptFilteredIntoFooterHeaderResponse in project wicket by apache.

the class ResourceDecorationApplication method init.

@Override
protected void init() {
    super.init();
    getResourceBundles().addCssBundle(ResourceDecorationApplication.class, "css-bundle.css", new CssResourceReference(HomePage.class, "footer.css"), new CssResourceReference(HomePage.class, "header.css"));
    setHeaderResponseDecorator(response -> {
        // footer (after </body>)
        return new ResourceAggregator(new JavaScriptFilteredIntoFooterHeaderResponse(response, "footerJS"));
    });
}
Also used : JavaScriptFilteredIntoFooterHeaderResponse(org.apache.wicket.markup.head.filter.JavaScriptFilteredIntoFooterHeaderResponse) ResourceAggregator(org.apache.wicket.markup.head.ResourceAggregator) CssResourceReference(org.apache.wicket.request.resource.CssResourceReference)

Aggregations

ResourceAggregator (org.apache.wicket.markup.head.ResourceAggregator)1 JavaScriptFilteredIntoFooterHeaderResponse (org.apache.wicket.markup.head.filter.JavaScriptFilteredIntoFooterHeaderResponse)1 CssResourceReference (org.apache.wicket.request.resource.CssResourceReference)1