Top Description Fields Constructors Methods
javax.faces.context

public Class PartialResponseWriter

extends ResponseWriterWrapper
Class Inheritance
Known Direct Subclasses
com.sun.faces.context.PartialViewContextImpl.DelayedInitPartialResponseWriter
Imports
java.io.IOException, java.util.Map, javax.faces.component.NamingContainer, .UIViewRoot, javax.faces.render.ResponseStateManager

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.

Since
2.0

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private boolean
private boolean
public 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.

Constructor Summary

AccessConstructor and Description
public
PartialResponseWriter(ResponseWriter
The writer to wrap.
writer
)

Create a PartialResponseWriter.

Method Summary

Modifier and TypeMethod and Description
public void
delete(String
ID of the node to be deleted
targetId
)

Write a delete operation.

private void
public void
endDocument()

Overrides javax.faces.context.ResponseWriterWrapper.endDocument.

Write the end of a partial response.

public void
endError()

Write the end of an error.

public void
endEval()

Write the end of an eval operation.

public void
endExtension()

Write the end of an extension operation.

public void
endInsert()

Write the end of an insert operation.

public void
endUpdate()

Write the end of an update operation.

private void
public void
redirect(String
URL to redirect to
url
)

Write a redirect operation.

private void
public void
startDocument()

Overrides javax.faces.context.ResponseWriterWrapper.startDocument.

Write the start of a partial response.

public void
startError(String
Descriptive string for the error
errorName
)

Write the start of an error.

public void
startEval()

Write the start of an eval operation.

public void
startExtension(Map<String, String>
String name/value pairs for extension element attributes
attributes
)

Write the start of an extension operation.

public void
startInsertAfter(String
ID of the node insertion should occur after
targetId
)

Write the start of an insert operation where the contents will be inserted after the specified target node.

public void
startInsertBefore(String
ID of the node insertion should occur before
targetId
)

Write the start of an insert operation where the contents will be inserted before the specified target node.

public void
startUpdate(String
ID of the node to be updated
targetId
)

Write the start of an update operation.

public void
updateAttributes(String
ID of the node to be updated
targetId
,
Map<String, String>
Map of attribute name/value pairs to be updated
attributes
)

Write an attribute update operation.

Inherited from javax.faces.context.ResponseWriterWrapper:
cloneWithWritercloseendCDATAendElementflushgetCharacterEncodinggetContentTypegetWrappedstartCDATAstartElementwritewriteAttributewriteCommentwriteDoctypewritePreamblewriteTextwriteTextwriteTextwriteURIAttribute

Field Detail

inChangesback to summary
private boolean inChanges
inInsertAfterback to summary
private boolean inInsertAfter
inInsertBeforeback to summary
private boolean inInsertBefore
inUpdateback to summary
private boolean inUpdate
RENDER_ALL_MARKERback to summary
public static final String RENDER_ALL_MARKER

Reserved ID value to indicate entire ViewRoot.

Since
2.0
VIEW_STATE_MARKERback to summary
public static final String VIEW_STATE_MARKER

Reserved ID value to indicate serialized ViewState.

Since
2.0

Constructor Detail

PartialResponseWriterback to summary
public PartialResponseWriter(ResponseWriter writer)

Create a PartialResponseWriter.

Parameters
writer:ResponseWriter

The writer to wrap.

Since
2.0

Method Detail

deleteback to summary
public void delete(String targetId) throws IOException

Write a delete operation.

Parameters
targetId:String

ID of the node to be deleted

Exceptions
IOException:
if an input/output error occurs
Since
2.0
endChangesIfNecessaryback to summary
private void endChangesIfNecessary() throws IOException
endDocumentback to summary
public void endDocument() throws IOException

Overrides javax.faces.context.ResponseWriterWrapper.endDocument.

Write the end of a partial response.

Annotations
@Override
Exceptions
IOException:
if an input/output error occurs
Since
2.0
endErrorback to summary
public void endError() throws IOException

Write the end of an error.

Exceptions
IOException:
if an input/output error occurs
Since
2.0
endEvalback to summary
public void endEval() throws IOException

Write the end of an eval operation.

Exceptions
IOException:
if an input/output error occurs
Since
2.0
endExtensionback to summary
public void endExtension() throws IOException

Write the end of an extension operation.

Exceptions
IOException:
if an input/output error occurs
Since
2.0
endInsertback to summary
public void endInsert() throws IOException

Write the end of an insert operation.

Exceptions
IOException:
if an input/output error occurs
Since
2.0
endUpdateback to summary
public void endUpdate() throws IOException

Write the end of an update operation.

Exceptions
IOException:
if an input/output error occurs
Since
2.0
endUpdateIfNecessaryback to summary
private void endUpdateIfNecessary() throws IOException
redirectback to summary
public void redirect(String url) throws IOException

Write a redirect operation.

Parameters
url:String

URL to redirect to

Exceptions
IOException:
if an input/output error occurs
Since
2.0
startChangesIfNecessaryback to summary
private void startChangesIfNecessary() throws IOException
startDocumentback to summary
public void startDocument() throws IOException

Overrides javax.faces.context.ResponseWriterWrapper.startDocument.

Write the start of a partial response.

If UIViewRoot is an instance of NamingContainer, then write UIViewRoot#getContainerClientId(FacesContext) as value of the id attribute of the root element.

Annotations
@Override
Exceptions
IOException:
if an input/output error occurs
Since
2.0
startErrorback to summary
public void startError(String errorName) throws IOException

Write the start of an error.

Parameters
errorName:String

Descriptive string for the error

Exceptions
IOException:
if an input/output error occurs
Since
2.0
startEvalback to summary
public void startEval() throws IOException

Write the start of an eval operation.

Exceptions
IOException:
if an input/output error occurs
Since
2.0
startExtensionback to summary
public void startExtension(Map<String, String> attributes) throws IOException

Write the start of an extension operation.

Parameters
attributes:Map<String, String>

String name/value pairs for extension element attributes

Exceptions
IOException:
if an input/output error occurs
Since
2.0
startInsertAfterback to summary
public void startInsertAfter(String targetId) throws IOException

Write the start of an insert operation where the contents will be inserted after the specified target node.

Parameters
targetId:String

ID of the node insertion should occur after

Exceptions
IOException:
if an input/output error occurs
Since
2.0
startInsertBeforeback to summary
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.

Parameters
targetId:String

ID of the node insertion should occur before

Exceptions
IOException:
if an input/output error occurs
Since
2.0
startUpdateback to summary
public void startUpdate(String targetId) throws IOException

Write the start of an update operation.

Parameters
targetId:String

ID of the node to be updated

Exceptions
IOException:
if an input/output error occurs
Since
2.0
updateAttributesback to summary
public void updateAttributes(String targetId, Map<String, String> attributes) throws IOException

Write an attribute update operation.

Parameters
targetId:String

ID of the node to be updated

attributes:Map<String, String>

Map of attribute name/value pairs to be updated

Exceptions
IOException:
if an input/output error occurs
Since
2.0