/** * Creates and returns a bookmarkable link to this application's home page. * * @param id * Name of link * @return Link to home page for this application */ protected final BookmarkablePageLink<Void> homePageLink(final String id) { return new BookmarkablePageLink<>(id, getApplication().getHomePage()); }
/** * Creates and returns a bookmarkable link to this application's home page. * * @param id * Name of link * @return Link to home page for this application */ protected final BookmarkablePageLink<Void> homePageLink(final String id) { return new BookmarkablePageLink<>(id, getApplication().getHomePage()); }
/** * Creates and returns a bookmarkable link to this application's home page. * * @param id * Name of link * @return Link to home page for this application */ protected final BookmarkablePageLink homePageLink(final String id) { return new BookmarkablePageLink(id, getApplication().getHomePage()); }
/** * Creates and returns a bookmarkable link to this application's home page. * * @param id * Name of link * @return Link to home page for this application */ protected final BookmarkablePageLink<?> homePageLink(final String id) { return new BookmarkablePageLink<Void>(id, getApplication().getHomePage()); }
/** * Common code executed by constructors. */ private void commonInit() { // if automatic multi window support is on, add a page checker instance if (getApplication().getPageSettings().getAutomaticMultiWindowSupport()) { add(new PageMapChecker(this)); } }
/** * Common code executed by constructors. */ private void commonInit() { // if automatic multi window support is on, add a page checker instance if (getApplication().getPageSettings().getAutomaticMultiWindowSupport()) { add(new PageMapChecker(this)); } }
/** * * @see org.apache.wicket.Component#onAfterRender() */ @Override protected void onAfterRender() { super.onAfterRender(); // only in development mode validate the headers if (Application.DEVELOPMENT.equals(getApplication().getConfigurationType())) { // Ignore if an exception and a redirect happened in between (e.g. // RestartResponseAtInterceptPageException) if (getRequestCycle().getResponsePage() == this) { validateHeaders(); } } }
/** * * @see org.apache.wicket.Component#onAfterRender() */ @Override protected void onAfterRender() { // only in development mode validate the headers if (getApplication().usesDevelopmentConfig()) { // check headers only when page was completely rendered if (wasRendered(this)) { validateHeaders(); } } super.onAfterRender(); }
/** * * @see org.apache.wicket.Component#onAfterRender() */ @Override protected void onAfterRender() { // only in development mode validate the headers if (getApplication().usesDevelopmentConfig()) { // check headers only when page was completely rendered if (wasRendered(this)) { validateHeaders(); } } super.onAfterRender(); }
protected void onAfterRender() if (getApplication().getConfigurationType() == Application.DEVELOPMENT)
/** * Set-up response with appropriate content type, locale and encoding. The locale is set equal * to the session's locale. The content type header contains information about the markup type * (@see #getMarkupType()) and the encoding. The response (and request) encoding is determined * by an application setting (@see ApplicationSettings#getResponseRequestEncoding()). If null, * no xml decl will be written. * * @param response * The WebResponse object */ protected void configureResponse(final WebResponse response) { // Users may subclass setHeader() to set there own headers setHeaders(response); // The response encoding is an application setting final String encoding = getApplication().getRequestCycleSettings() .getResponseRequestEncoding(); final boolean validEncoding = (Strings.isEmpty(encoding) == false); final String contentType; if (validEncoding) { contentType = getMarkupType().getMimeType() + "; charset=" + encoding; } else { contentType = getMarkupType().getMimeType(); } response.setContentType(contentType); }
/** * Set-up response with appropriate content type, locale and encoding. The locale is set equal * to the session's locale. The content type header contains information about the markup type * (@see #getMarkupType()) and the encoding. The response (and request) encoding is determined * by an application setting (@see ApplicationSettings#getResponseRequestEncoding()). If null, * no xml decl will be written. * * @param response * The WebResponse object */ protected void configureResponse(final WebResponse response) { // Users may subclass setHeader() to set there own headers setHeaders(response); // The response encoding is an application setting final String encoding = getApplication().getRequestCycleSettings() .getResponseRequestEncoding(); final boolean validEncoding = (Strings.isEmpty(encoding) == false); final String contentType; if (validEncoding) { contentType = getMarkupType().getMimeType() + "; charset=" + encoding; } else { contentType = getMarkupType().getMimeType(); } response.setContentType(contentType); }