Class RenderCommandComponentEventResultProcessor
- java.lang.Object
-
- org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor
-
- All Implemented Interfaces:
ComponentEventResultProcessor<RenderCommand>
,PartialMarkupRendererFilter
public class RenderCommandComponentEventResultProcessor extends java.lang.Object implements ComponentEventResultProcessor<RenderCommand>, PartialMarkupRendererFilter
Processor for objects that implementRenderCommand
(such asBlockImpl
), used with an Ajax component event.
-
-
Constructor Summary
Constructors Constructor Description RenderCommandComponentEventResultProcessor(PageRenderQueue pageRenderQueue, AjaxFormUpdateController ajaxFormUpdateController, AjaxPartialResponseRenderer partialRenderer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processResultValue(RenderCommand value)
For a given, non-null return value from a component event method, construct and send a response.void
renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer)
As a filter, this class does three things: It creates an outer element to capture the partial page content that will be rendered It does setup and cleanup with theAjaxFormUpdateController
It extracts the child markup and stuffs it into the reply's "content" property.
-
-
-
Constructor Detail
-
RenderCommandComponentEventResultProcessor
public RenderCommandComponentEventResultProcessor(PageRenderQueue pageRenderQueue, AjaxFormUpdateController ajaxFormUpdateController, AjaxPartialResponseRenderer partialRenderer)
-
-
Method Detail
-
processResultValue
public void processResultValue(RenderCommand value) throws java.io.IOException
Description copied from interface:ComponentEventResultProcessor
For a given, non-null return value from a component event method, construct and send a response. Starting in release 5.4, it is recommended that for any response that involves Tapestry pages or components, the implementation should create anIOOperation
to do the rendering, and add the operation to theRequest
as attributeTapestryConstants.RESPONSE_RENDERER
. This avoids a number of issues related to theEnvironment
.- Specified by:
processResultValue
in interfaceComponentEventResultProcessor<RenderCommand>
- Parameters:
value
- the value returned from a method- Throws:
java.io.IOException
-
renderMarkup
public void renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer)
As a filter, this class does three things:- It creates an outer element to capture the partial page content that will be rendered
- It does setup and cleanup with the
AjaxFormUpdateController
- It extracts the child markup and stuffs it into the reply's "content" property.
- Specified by:
renderMarkup
in interfacePartialMarkupRendererFilter
- Parameters:
writer
- to which markup should be writtenreply
- JSONObject which will contain the partial responserenderer
- delegate to which the writer should be passed
-
-