public class PartialResponseWriter extends ResponseWriterWrapper
PartialResponseWriter
decorates an existing ResponseWriter to support the
generation of a partial response suitable for Ajax operations.
In addition to the markup generation methods inherited from
javax.faces.context.ResponseWriter, this class provides
methods for constructing the standard partial response elements.
| Modifier and Type | Field and Description |
|---|---|
static String |
RENDER_ALL_MARKER
Reserved ID value to indicate entire ViewRoot. |
static String |
VIEW_STATE_MARKER
Reserved ID value to indicate serialized ViewState. |
| Constructor and Description |
|---|
PartialResponseWriter(ResponseWriter writer)
Create a |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String targetId)
Write a delete operation. |
void |
endDocument()
Write the end of a partial response. |
void |
endError()
Write the end of an error. |
void |
endEval()
Write the end of an eval operation. |
void |
endExtension()
Write the end of an extension operation. |
void |
endInsert()
Write the end of an insert operation. |
void |
endUpdate()
Write the end of an update operation. |
ResponseWriter |
getWrapped()
Return the wrapped
|
void |
redirect(String url)
Write a redirect operation. |
void |
startDocument()
Write the start of a partial response. |
void |
startError(String errorName)
Write the start of an error. |
void |
startEval()
Write the start of an eval operation. |
void |
startExtension(Map<String,String> attributes)
Write the start of an extension operation. |
void |
startInsertAfter(String targetId)
Write the start of an insert operation where the contents will be inserted after the specified target node. |
void |
startInsertBefore(String targetId)
Write the start of an insert operation where the contents will be inserted before the specified target node. |
void |
startUpdate(String targetId)
Write the start of an update operation. |
void |
updateAttributes(String targetId,
Map<String,String> attributes)
Write an attribute update operation. |
cloneWithWriter, close, endElement, flush, getCharacterEncoding, getContentType, startElement, write, writeAttribute, writeComment, writeText, writeText, writeText, writeURIAttributepublic static final String RENDER_ALL_MARKER
Reserved ID value to indicate entire ViewRoot.
public static final String VIEW_STATE_MARKER
Reserved ID value to indicate serialized ViewState.
public PartialResponseWriter(ResponseWriter writer)
Create a PartialResponseWriter.
writer - The writer to wrap.public ResponseWriter getWrapped()
Return the wrapped
ResponseWriter instance.
getWrapped in class ResponseWriterWrapperResponseWriterWrapper.getWrapped()public void startDocument()
throws IOException
Write the start of a partial response.
startDocument in class ResponseWriterWrapperIOException - if an input/output error occursResponseWriter.startDocument()public void endDocument()
throws IOException
Write the end of a partial response.
endDocument in class ResponseWriterWrapperIOException - if an input/output error occursResponseWriter.endDocument()public void startInsertBefore(String targetId) throws IOException
Write the start of an insert operation where the contents will be inserted before the specified target node.
targetId - ID of the node insertion should occur beforeIOException - if an input/output error occurspublic void startInsertAfter(String targetId) throws IOException
Write the start of an insert operation where the contents will be inserted after the specified target node.
targetId - ID of the node insertion should occur afterIOException - if an input/output error occurspublic void endInsert()
throws IOException
Write the end of an insert operation.
IOException - if an input/output error occurspublic void startUpdate(String targetId) throws IOException
Write the start of an update operation.
targetId - ID of the node to be updatedIOException - if an input/output error occurspublic void endUpdate()
throws IOException
Write the end of an update operation.
IOException - if an input/output error occurspublic void updateAttributes(String targetId, Map<String,String> attributes) throws IOException
Write an attribute update operation.
targetId - ID of the node to be updatedattributes - Map of attribute name/value pairs to be updatedIOException - if an input/output error occurspublic void delete(String targetId) throws IOException
Write a delete operation.
targetId - ID of the node to be deletedIOException - if an input/output error occurspublic void redirect(String url) throws IOException
Write a redirect operation.
url - URL to redirect toIOException - if an input/output error occurspublic void startEval()
throws IOException
Write the start of an eval operation.
IOException - if an input/output error occurspublic void endEval()
throws IOException
Write the end of an eval operation.
IOException - if an input/output error occurspublic void startExtension(Map<String,String> attributes) throws IOException
Write the start of an extension operation.
attributes - String name/value pairs for extension element attributesIOException - if an input/output error occurspublic void endExtension()
throws IOException
Write the end of an extension operation.
IOException - if an input/output error occurspublic void startError(String errorName) throws IOException
Write the start of an error.
errorName - Descriptive string for the errorIOException - if an input/output error occurspublic void endError()
throws IOException
Write the end of an error.
IOException - if an input/output error occursCopyright © 2018 JBoss by Red Hat. All rights reserved.