org.apache.tapestry5.internal.services
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
 void addPartialMarkupRendererFilter(PartialMarkupRendererFilter filter)
          Adds an optional filter to the rendering.
 Page getRenderingPage()
          Returns the page that is rendering markup content.
 RenderCommand getRootRenderCommand()
          Obtains the value previously supplied to initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand).
 void initializeForCompletePage(Page page)
          Initializes the queue for rendering of a complete page.
 void initializeForPartialPageRender(RenderCommand rootCommand)
          Initializes the queue for rendering of a portion of a page.
 boolean isPartialRenderInitialized()
          Returns true if initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand) has been invoked.
 void render(MarkupWriter writer)
          Render to the write, as setup by the initialize method.
 void renderPartial(MarkupWriter writer, JSONObject reply)
          Performs a partial markup render, as configured via initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand).
 void setRenderingPage(Page page)
          Sets the default page that will render the response.
 

Method Detail

initializeForCompletePage

void initializeForCompletePage(Page page)
Initializes the queue for rendering of a complete page.


setRenderingPage

void setRenderingPage(Page page)
Sets the default page that will render the response.


getRenderingPage

Page getRenderingPage()
Returns the page that is rendering markup content.


initializeForPartialPageRender

void initializeForPartialPageRender(RenderCommand rootCommand)
Initializes the queue for rendering of a portion of a page.


getRootRenderCommand

RenderCommand getRootRenderCommand()
Obtains the value previously supplied to initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand). This allows the "natural" renderer to be substituted or otherwise manipulated.

Returns:
the root renderer

isPartialRenderInitialized

boolean isPartialRenderInitialized()
Returns true if initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand) has been invoked.


render

void render(MarkupWriter writer)
Render to the write, as setup by the initialize method.

Parameters:
writer - to write markup to

renderPartial

void renderPartial(MarkupWriter writer,
                   JSONObject reply)
Performs a partial markup render, as configured via initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand).

Parameters:
writer - to which markup should be written
reply - JSONObject which will contain the partial response

addPartialMarkupRendererFilter

void addPartialMarkupRendererFilter(PartialMarkupRendererFilter filter)
Adds an optional filter to the rendering. Optional filters are temporary, used just during the current partial render (as opposed to filters contributed to the PartialMarkupRenderer 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.

Parameters:
filter - to add to the pipeline


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.