public class RenderCommandComponentEventResultProcessor extends Object implements ComponentEventResultProcessor<RenderCommand>, PartialMarkupRendererFilter
RenderCommand
(such as
BlockImpl
), used with an Ajax component event.Constructor and Description |
---|
RenderCommandComponentEventResultProcessor(PageRenderQueue pageRenderQueue,
AjaxFormUpdateController ajaxFormUpdateController,
AjaxPartialResponseRenderer partialRenderer) |
Modifier and Type | Method and 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 the
AjaxFormUpdateController
It extracts the child markup and stuffs it into the reply's "content" property.
|
public RenderCommandComponentEventResultProcessor(PageRenderQueue pageRenderQueue, AjaxFormUpdateController ajaxFormUpdateController, AjaxPartialResponseRenderer partialRenderer)
public void processResultValue(RenderCommand value) throws IOException
ComponentEventResultProcessor
IOOperation
to do the rendering, and
add the operation to the Request
as attribute
TapestryConstants.RESPONSE_RENDERER
.
This avoids a number of issues related to the Environment
.processResultValue
in interface ComponentEventResultProcessor<RenderCommand>
value
- the value returned from a methodIOException
public void renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer)
AjaxFormUpdateController
renderMarkup
in interface PartialMarkupRendererFilter
writer
- to which markup should be writtenreply
- JSONObject which will contain the partial responserenderer
- delegate to which the writer should be passed5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.