Search in sources :

Example 1 with IHeaderResponseDecorator

use of org.apache.wicket.markup.html.IHeaderResponseDecorator in project wicket by apache.

the class FilteringHeaderResponseTest method footerDependsOnHeadItem.

@Test
public void footerDependsOnHeadItem() throws Exception {
    tester.getApplication().setHeaderResponseDecorator(new IHeaderResponseDecorator() {

        @Override
        public IHeaderResponse decorate(IHeaderResponse response) {
            // footer (after </body>)
            return new ResourceAggregator(new JavaScriptFilteredIntoFooterHeaderResponse(response, "footerJS"));
        }
    });
    executeTest(FilteredHeaderPage.class, "FilteredHeaderPageExpected.html");
}
Also used : IHeaderResponse(org.apache.wicket.markup.head.IHeaderResponse) ResourceAggregator(org.apache.wicket.markup.head.ResourceAggregator) IHeaderResponseDecorator(org.apache.wicket.markup.html.IHeaderResponseDecorator) Test(org.junit.Test)

Aggregations

IHeaderResponse (org.apache.wicket.markup.head.IHeaderResponse)1 ResourceAggregator (org.apache.wicket.markup.head.ResourceAggregator)1 IHeaderResponseDecorator (org.apache.wicket.markup.html.IHeaderResponseDecorator)1 Test (org.junit.Test)1