- java.lang.Object
-
- java.io.Writer
-
- javax.faces.context.ResponseWriter
-
- javax.faces.context.ResponseWriterWrapper
-
- javax.faces.context.PartialResponseWriter
-
- All Implemented Interfaces:
- Closeable, Flushable, Appendable, AutoCloseable, FacesWrapper<ResponseWriter>
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 fromjavax.faces.context.ResponseWriter
, this class provides methods for constructing the standard partial response elements.- Since:
- 2.0
-
-
Field Summary
Fields 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.
-
Fields inherited from class java.io.Writer
lock
-
-
Constructor Summary
Constructors Constructor and Description PartialResponseWriter(ResponseWriter writer)
Create a
PartialResponseWriter
.
-
Method Summary
All Methods Instance Methods Concrete Methods 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
ResponseWriter
instance.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.
-
Methods inherited from class javax.faces.context.ResponseWriterWrapper
cloneWithWriter, close, endCDATA, endElement, flush, getCharacterEncoding, getContentType, startCDATA, startElement, write, writeAttribute, writeComment, writeDoctype, writePreamble, writeText, writeText, writeText, writeURIAttribute
-
-
-
-
Field Detail
-
RENDER_ALL_MARKER
public static final String RENDER_ALL_MARKER
Reserved ID value to indicate entire ViewRoot.
- Since:
- 2.0
- See Also:
- Constant Field Values
-
VIEW_STATE_MARKER
public static final String VIEW_STATE_MARKER
Reserved ID value to indicate serialized ViewState.
- Since:
- 2.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PartialResponseWriter
public PartialResponseWriter(ResponseWriter writer)
Create a
PartialResponseWriter
.- Parameters:
writer
- The writer to wrap.- Since:
- 2.0
-
-
Method Detail
-
getWrapped
public ResponseWriter getWrapped()
Return the wrapped
ResponseWriter
instance.- Specified by:
getWrapped
in interfaceFacesWrapper<ResponseWriter>
- Specified by:
getWrapped
in classResponseWriterWrapper
- Since:
- 2.0
- See Also:
ResponseWriterWrapper.getWrapped()
-
startDocument
public void startDocument() throws IOException
Write the start of a partial response.
- Overrides:
startDocument
in classResponseWriterWrapper
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
- See Also:
ResponseWriter.startDocument()
-
endDocument
public void endDocument() throws IOException
Write the end of a partial response.
- Overrides:
endDocument
in classResponseWriterWrapper
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
- See Also:
ResponseWriter.endDocument()
-
startInsertBefore
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
- ID of the node insertion should occur before- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
startInsertAfter
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
- ID of the node insertion should occur after- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
endInsert
public void endInsert() throws IOException
Write the end of an insert operation.
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
startUpdate
public void startUpdate(String targetId) throws IOException
Write the start of an update operation.
- Parameters:
targetId
- ID of the node to be updated- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
endUpdate
public void endUpdate() throws IOException
Write the end of an update operation.
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
updateAttributes
public void updateAttributes(String targetId, Map<String,String> attributes) throws IOException
Write an attribute update operation.
- Parameters:
targetId
- ID of the node to be updatedattributes
- Map of attribute name/value pairs to be updated- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
delete
public void delete(String targetId) throws IOException
Write a delete operation.
- Parameters:
targetId
- ID of the node to be deleted- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
redirect
public void redirect(String url) throws IOException
Write a redirect operation.
- Parameters:
url
- URL to redirect to- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
startEval
public void startEval() throws IOException
Write the start of an eval operation.
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
endEval
public void endEval() throws IOException
Write the end of an eval operation.
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
startExtension
public void startExtension(Map<String,String> attributes) throws IOException
Write the start of an extension operation.
- Parameters:
attributes
- String name/value pairs for extension element attributes- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
endExtension
public void endExtension() throws IOException
Write the end of an extension operation.
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
startError
public void startError(String errorName) throws IOException
Write the start of an error.
- Parameters:
errorName
- Descriptive string for the error- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
endError
public void endError() throws IOException
Write the end of an error.
- Throws:
IOException
- if an input/output error occurs- Since:
- 2.0
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 13:04:14 Cette version de la page est en cache (à la date du 21/08/2025 13:04:14) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/faces/context/PartialResponseWriter.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.