Class PageRenderer

  • Direct Known Subclasses:
    WebPageRenderer

    public abstract class PageRenderer
    extends Object
    Delegate responsible for rendering the page. Depending on the implementation (web, test, portlet, etc.) the delegate may or may not support the redirect policy set in the RenderPageRequestHandler.
    Author:
    Matej Knopp
    • Method Detail

      • getSessionId

        protected String getSessionId()
        Returns:
        the current session id for stateful pages and null for stateless pages
      • isSessionTemporary

        protected boolean isSessionTemporary()
        Returns:
        whether the current session is temporary
      • enableRedirectForStatelessPage

        protected boolean enableRedirectForStatelessPage()
        When the page renders to buffer and it is still stateless after rendering, this flag determines whether the redirect will take place or not.

        By default we will redirect. This is so we do not end up having the browser be on a listener URL. A simple scenario is calling setResponsePage(new StatelessPage()) inside form's onSubmit() or link's onClick() callbacks, or any other request listener callback. What will happen is that the browser will be on URL like ./wicket/page?0-2.IFormSubmitListener-form, and we will not redirect - leaving the browser on such URL. This is a worse alternative then saving one redirect because it may cause problems if user presses the refresh button in the browser.

        Returns:
        redirect flag