Package org.apache.tapestry5.services
Class StreamPageContent
-
- org.apache.tapestry5.services.StreamPageContent
-
public final class StreamPageContent extends
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 standardPageRenderRequestHandler
pipeline.- Since:
- 5.2.0
-
-
Constructor Summary
Constructors Constructor Description StreamPageContent()
Creates an instance that streams the activate page's content (that is,getPageClass()
will be null).<?> pageClass)
Renders the page using an empty page activation context.<?> pageClass, ... pageActivationContext)
Renders the page using the supplied page activation context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description []
getPageActivationContext()
Returns the activation context of the page.<?>
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.boolean
isBypassActivation()
StreamPageContent
withoutActivation()
Returns a new StreamPageInstance with the bypass activation flag set to true, such that page activation will be bypassed when the page is rendered.
-
-
-
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.- Since:
- 5.4
-
StreamPageContent
public <?> pageClass)
Renders the page using an empty page activation context.- Parameters:
pageClass
- class of the page to render
-
StreamPageContent
public <?> pageClass, ... pageActivationContext)
Renders the page using the supplied page activation context.- Parameters:
pageClass
- class of the page to render, or null to render the currently active page (as perRequestGlobals.getActivePageName()
)pageActivationContext
- activation context of the page
-
-
Method Detail
-
getPageClass
public <?> 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 [] getPageActivationContext()
Returns the activation context of the page. May return null to indicate an empty activation context.
-
withoutActivation
public StreamPageContent withoutActivation()
Returns a new StreamPageInstance with the bypass activation flag set to true, such that page activation will be bypassed when the page is rendered.- Returns:
- new instance
-
isBypassActivation
public boolean isBypassActivation()
- Returns:
- true if configured to bypass activation
-
-