|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResponseBuilder
Represents the class responsible for interacting with components for an ajax request library version and type.
Field Summary | |
---|---|
static String |
SCRIPT_BLOCK
Id of html element that dynamic javascript contributions will be made to by core tapestry components. |
Method Summary | |
---|---|
void |
addExceptionResponse(org.apache.tapestry.IPage exceptionPage,
org.apache.tapestry.IRequestCycle cycle)
Adds the specified Exception page to Ajax response. |
void |
addPostProcessScript(String script)
Script that will be executed just after any content replacements in the response, but before anything in the normal script blocks. |
void |
addPreProcessScript(String script)
Adds the specified script string to the preprocessing section of the client response. |
void |
addResponseBlock(String id,
String data)
Adds an arbitrary block of markup to this responses response. |
void |
addStatusResponse(String status)
Adds an xml response block of type "statustext". |
void |
cleanupAfterRender()
Invoked by AjaxDirectService after a request cycle
so invokers can cleanup resources. |
boolean |
componentWriterExists(String id)
Checks for the existance of a previously created component IMarkupWriter , this is currently
only used in manual block writing semantics, specifically
in the Tree components rendering logic. |
AjaxWebRequest |
getAjaxRequest()
The ajax request |
org.apache.tapestry.IMarkupWriter |
getComponentWriter(String id)
Gets a NestedMarkupWriter for the specified
component to write to and caches the buffer for later
write to the stream via the cleanupAfterRender() . |
String |
getContentType()
Should return the content type response that this builder generates. |
org.apache.tapestry.IMarkupWriter |
getScriptWriter()
Return a valid writer instance that is setup to write to the SCRIPT_BLOCK portion of
the response. |
org.apache.tapestry.IMarkupWriter |
getWriter()
The writer |
org.apache.tapestry.IMarkupWriter |
getWriter(org.apache.tapestry.IComponent component,
org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.IMarkupWriter writer)
Invoked by enhanced IRender.render(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
methods before rendering to replace their incoming IMarkupWriter instance with the one
provided by this class, which may return the same writer or a special writer
depending on the circumstances. |
void |
prepareForRender()
Called before invoking either updateComponentsDirect(IRequestCycle, IPage, IPage, IComponent) ,
or if in full render mode invoking renderRequest( |
void |
removeComponentWriter(String id)
Removes the specified IMarkupWriter from this reponse,
if it exists. |
void |
renderResponse(org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.IPage activePage,
org.apache.tapestry.IPage componentPage,
org.apache.tapestry.IComponent component)
Called to render a complete response to the client, in the case of of direct component updates being set to false. |
void |
setAjaxRequest(AjaxWebRequest ajaxRequest)
Sets the associated ajax request. |
void |
setWriter(org.apache.tapestry.IMarkupWriter writer)
Sets the text/xml response writer. |
void |
updateComponentsDirect(org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.IPage activePage,
org.apache.tapestry.IPage componentPage,
org.apache.tapestry.IComponent component)
Called to update all components in cycle directly, without causing any other component to render output. |
Field Detail |
---|
static final String SCRIPT_BLOCK
Method Detail |
---|
AjaxWebRequest getAjaxRequest()
void setAjaxRequest(AjaxWebRequest ajaxRequest)
ajaxRequest
- org.apache.tapestry.IMarkupWriter getWriter()
void setWriter(org.apache.tapestry.IMarkupWriter writer)
writer
- org.apache.tapestry.IMarkupWriter getWriter(org.apache.tapestry.IComponent component, org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.IMarkupWriter writer)
IRender.render(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
methods before rendering to replace their incoming IMarkupWriter instance with the one
provided by this class, which may return the same writer or a special writer
depending on the circumstances.
component
- cycle
- writer
- Current writer rendering response
NullWriter
, an ajax
xml response stream, or a normal html response stream.void prepareForRender()
updateComponentsDirect(IRequestCycle, IPage, IPage, IComponent)
,
or if in full render mode invoking renderRequest(
void updateComponentsDirect(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.IPage activePage, org.apache.tapestry.IPage componentPage, org.apache.tapestry.IComponent component)
cycle
- activePage
- componentPage
- component
- void renderResponse(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.IPage activePage, org.apache.tapestry.IPage componentPage, org.apache.tapestry.IComponent component)
cycle
- activePage
- componentPage
- component
- void cleanupAfterRender()
AjaxDirectService
after a request cycle
so invokers can cleanup resources.
In the case of full page/non direct component invocations
this causes all the buffered component IMarkupWriter
instances
to have their contents written to the response stream.
String getContentType()
void addResponseBlock(String id, String data)
id
- The component/block id to associate with response.data
- The content to writeorg.apache.tapestry.IMarkupWriter getScriptWriter()
SCRIPT_BLOCK
portion of
the response.
org.apache.tapestry.IMarkupWriter getComponentWriter(String id)
NestedMarkupWriter
for the specified
component to write to and caches the buffer for later
write to the stream via the cleanupAfterRender()
.
id
-
void removeComponentWriter(String id)
IMarkupWriter
from this reponse,
if it exists.
id
- boolean componentWriterExists(String id)
IMarkupWriter
, this is currently
only used in manual block writing semantics, specifically
in the Tree components rendering logic.
void addStatusResponse(String status)
status
- AjaxWebRequest.addStatusResponse(String)
void addPreProcessScript(String script)
script
- void addPostProcessScript(String script)
script
- void addExceptionResponse(org.apache.tapestry.IPage exceptionPage, org.apache.tapestry.IRequestCycle cycle)
exceptionPage
- cycle
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |