Search in sources :

Example 1 with FilteredHeaderItem

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

the class HomePage method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    super.renderHead(response);
    // example of things that may be shared for all your applications across your company,
    // two CSS resources in the same group. header.css is rendered first because has lower
    // "order" number
    response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "footer.css")));
    response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css")));
    // example of something that may be in this single application:
    response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "app.css")));
    // example of something that may be limited to certain pages:
    response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "HomePage.css")));
    response.render(JavaScriptHeaderItem.forReference(new JQueryPluginResourceReference(HomePage.class, "HomePage.js")));
    response.render(new FilteredHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(HomePage.class, "top.js")), FilteringHeaderResponse.DEFAULT_HEADER_FILTER_NAME));
}
Also used : JQueryPluginResourceReference(org.apache.wicket.resource.JQueryPluginResourceReference) FilteredHeaderItem(org.apache.wicket.markup.head.filter.FilteredHeaderItem) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference) CssResourceReference(org.apache.wicket.request.resource.CssResourceReference)

Aggregations

FilteredHeaderItem (org.apache.wicket.markup.head.filter.FilteredHeaderItem)1 CssResourceReference (org.apache.wicket.request.resource.CssResourceReference)1 JavaScriptResourceReference (org.apache.wicket.request.resource.JavaScriptResourceReference)1 JQueryPluginResourceReference (org.apache.wicket.resource.JQueryPluginResourceReference)1