Class StreamPageContent

  • public final class StreamPageContent
    extends Object
    An event handler method may return an instance of this class to trigger the rendering of a particular page without causing a redirect to that page; the rendering takes place as part of the original component event request, thus forming the opposite of Tapestry's normal redirect-after-event behavior. The page will be activated using the provided page activation context (or an empty page activation context). Starting with 5.3, the page activation step can be bypassed. Rendering occurs using the standard PageRenderRequestHandler pipeline.
    • Constructor Detail

      • StreamPageContent

        public StreamPageContent()
        Creates an instance that streams the activate page's content (that is, getPageClass() will be null). Unless otherwise configured, page activation will take place.
      • StreamPageContent

        public StreamPageContent​(Class<?> pageClass)
        Renders the page using an empty page activation context.
        pageClass - class of the page to render
      • StreamPageContent

        public StreamPageContent​(Class<?> pageClass,
                                 Object... pageActivationContext)
        Renders the page using the supplied page activation context.
        pageClass - class of the page to render, or null to render the currently active page (as per RequestGlobals.getActivePageName())
        pageActivationContext - activation context of the page
    • Method Detail

      • getPageClass

        public Class<?> getPageClass()
        Returns the class of the page to render, or null to indicate that the active page for the request should simply be re-rendered.
      • getPageActivationContext

        public Object[] getPageActivationContext()
        Returns the activation context of the page. May return null to indicate an empty activation context.
      • isBypassActivation

        public boolean isBypassActivation()
        true if configured to bypass activation