@Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); response.render( JavaScriptReferenceHeaderItem.forReference( Application.get().getJavaScriptLibrarySettings().getJQueryReference())); response.render( StringHeaderItem.forString(WicketUtils.getCssForFavicon(getUrl("/favicon.ico")))); if (WebConfiguration.isDevelopmentMode() == true) { response.render( CssReferenceHeaderItem.forUrl( "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".css")); } else { response.render( CssReferenceHeaderItem.forUrl( "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".min.css")); } response.render(CssReferenceHeaderItem.forUrl("mobile/projectforge.css")); response.render(JavaScriptReferenceHeaderItem.forUrl("mobile/jquery.mobile/myconfig.js")); if (WebConfiguration.isDevelopmentMode() == true) { // response.renderJavaScriptReference("mobile/jquery.mobile/myconfig.js"); response.render( JavaScriptReferenceHeaderItem.forUrl( "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".js")); } else { // response.renderJavaScriptReference("mobile/jquery.mobile/myconfig.js"); response.render( JavaScriptReferenceHeaderItem.forUrl( "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".min.js")); } }
/** * Renders the content of the <head> section of the page, including <wicket:head> * sections in subclasses of the page. For every child-component, the content is rendered to a * string and passed to {@link IHeaderResponse}. * * @param headerStreamState */ public void renderHeaderTagBody(HeaderStreamState headerStreamState) { if (headerStreamState == null) return; final Response oldResponse = getRequestCycle().getResponse(); try { // Create a separate (string) response for the header container itself final StringResponse bodyResponse = new StringResponse(); getRequestCycle().setResponse(bodyResponse); // render the header section directly associated with the markup super.onComponentTagBody(headerStreamState.getMarkupStream(), headerStreamState.getOpenTag()); CharSequence bodyOutput = getCleanResponse(bodyResponse); if (bodyOutput.length() > 0) { getHeaderResponse().render(StringHeaderItem.forString(bodyOutput)); } } finally { getRequestCycle().setResponse(oldResponse); } }