Class PageRenderQueueImpl
java.lang.Object
org.apache.tapestry5.internal.services.PageRenderQueueImpl
- All Implemented Interfaces:
PageRenderQueue
This services keeps track of the page being rendered and the root command for the partial render, it is therefore
request/thread scoped. There's a filter pipeline around the rendering, and that gets to be stateless because this
service, at the end of the pipeline, is stateful.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an optional filter to the rendering.void
addPartialRenderer
(RenderCommand renderer) Adds a rendering command to the queue of rendering commands.Returns the page that is rendering markup content.void
Initializes the queue for rendering of a complete page.boolean
void
render
(MarkupWriter writer) Render to the markup writer, as setup by thePageRenderQueue.initializeForCompletePage(org.apache.tapestry5.internal.structure.Page)
orPageRenderQueue.addPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)
methods.void
renderPartial
(MarkupWriter writer, JSONObject reply) Performs a partial markup render, as configured viaPageRenderQueue.addPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)
.void
setRenderingPage
(Page page) Sets the default page that will render the response.
-
Constructor Details
-
PageRenderQueueImpl
-
-
Method Details
-
initializeForCompletePage
Description copied from interface:PageRenderQueue
Initializes the queue for rendering of a complete page.- Specified by:
initializeForCompletePage
in interfacePageRenderQueue
-
setRenderingPage
Description copied from interface:PageRenderQueue
Sets the default page that will render the response.- Specified by:
setRenderingPage
in interfacePageRenderQueue
-
isPartialRenderInitialized
Description copied from interface:PageRenderQueue
Returns true if eitherPageRenderQueue.addPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)
orPageRenderQueue.addPartialMarkupRendererFilter(org.apache.tapestry5.services.PartialMarkupRendererFilter)
has been invoked.- Specified by:
isPartialRenderInitialized
in interfacePageRenderQueue
-
addPartialRenderer
Description copied from interface:PageRenderQueue
Adds a rendering command to the queue of rendering commands. This must not be invoked until after the rendering page has been identified.- Specified by:
addPartialRenderer
in interfacePageRenderQueue
- Parameters:
renderer
- responsible for rendering a portion of the final markup
-
getRenderingPage
Description copied from interface:PageRenderQueue
Returns the page that is rendering markup content.- Specified by:
getRenderingPage
in interfacePageRenderQueue
-
render
Description copied from interface:PageRenderQueue
Render to the markup writer, as setup by thePageRenderQueue.initializeForCompletePage(org.apache.tapestry5.internal.structure.Page)
orPageRenderQueue.addPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)
methods.- Specified by:
render
in interfacePageRenderQueue
- Parameters:
writer
- to write markup to
-
addPartialMarkupRendererFilter
Description copied from interface:PageRenderQueue
Adds an optional filter to the rendering. Optional filters are temporary, used just during the current partial render (as opposed to filters contributed to thePartialMarkupRenderer
service which are permanent, shared and stateless. Filters are added to the end of the pipeline (after all permanent contributions). Filters will be executed in the order in which they are added.- Specified by:
addPartialMarkupRendererFilter
in interfacePageRenderQueue
- Parameters:
filter
- to add to the pipeline
-
renderPartial
Description copied from interface:PageRenderQueue
Performs a partial markup render, as configured viaPageRenderQueue.addPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)
.- Specified by:
renderPartial
in interfacePageRenderQueue
- Parameters:
writer
- to which markup should be writtenreply
- JSONObject which will contain the partial response
-