Interface PageRenderQueue
- All Known Implementing Classes:
PageRenderQueueImpl
public interface PageRenderQueue
A wrapper around
RenderQueue, but referencable as a (per-thread) service. This
service is scoped so that we can tell it what to render in one method, then have it do the render in another. Part of
an elaborate scheme to keep certain interfaces public and other closely related ones private.-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an optional filter to the rendering.voidaddPartialRenderer(RenderCommand renderer) Adds a rendering command to the queue of rendering commands.Returns the page that is rendering markup content.voidInitializes the queue for rendering of a complete page.booleanReturns true if eitheraddPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)oraddPartialMarkupRendererFilter(org.apache.tapestry5.services.PartialMarkupRendererFilter)has been invoked.voidrender(MarkupWriter writer) Render to the markup writer, as setup by theinitializeForCompletePage(org.apache.tapestry5.internal.structure.Page)oraddPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)methods.voidrenderPartial(MarkupWriter writer, JSONObject reply) Performs a partial markup render, as configured viaaddPartialRenderer(org.apache.tapestry5.runtime.RenderCommand).voidsetRenderingPage(Page page) Sets the default page that will render the response.
-
Method Details
-
initializeForCompletePage
Initializes the queue for rendering of a complete page. -
setRenderingPage
Sets the default page that will render the response. -
getRenderingPage
Returns the page that is rendering markup content. -
addPartialRenderer
Adds a rendering command to the queue of rendering commands. This must not be invoked until after the rendering page has been identified.- Parameters:
renderer- responsible for rendering a portion of the final markup
-
isPartialRenderInitialized
boolean isPartialRenderInitialized()Returns true if eitheraddPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)oraddPartialMarkupRendererFilter(org.apache.tapestry5.services.PartialMarkupRendererFilter)has been invoked. -
render
Render to the markup writer, as setup by theinitializeForCompletePage(org.apache.tapestry5.internal.structure.Page)oraddPartialRenderer(org.apache.tapestry5.runtime.RenderCommand)methods.- Parameters:
writer- to write markup to
-
renderPartial
Performs a partial markup render, as configured viaaddPartialRenderer(org.apache.tapestry5.runtime.RenderCommand).- Parameters:
writer- to which markup should be writtenreply- JSONObject which will contain the partial response
-
addPartialMarkupRendererFilter
Adds an optional filter to the rendering. Optional filters are temporary, used just during the current partial render (as opposed to filters contributed to thePartialMarkupRendererservice 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.- Parameters:
filter- to add to the pipeline
-