javax.faces.context Class PartialResponseWriter


javax.faces.context
Class PartialResponseWriter

java.lang.Object
  extended by java.io.Writer
      extended by javax.faces.context.ResponseWriter
          extended by javax.faces.context.ResponseWriterWrapper
              extended by javax.faces.context.PartialResponseWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable, 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 from javax.faces.context.ResponseWriter, this class provides methods for constructing the standard partial response elements.

Since:
2.0

Field Summary
static java.lang.StringRENDER_ALL_MARKER           

Reserved ID value to indicate entire ViewRoot.

static java.lang.StringVIEW_STATE_MARKER           

Reserved ID value to indicate serialized ViewState.

 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
PartialResponseWriter(ResponseWriter writer)           

Create a PartialResponseWriter.

 
Method Summary
 voiddelete(java.lang.String targetId)           

Write a delete operation.

 voidendDocument()           

Write the end of a partial response.

 voidendError()           

Write the end of an error.

 voidendEval()           

Write the end of an eval operation.

 voidendExtension()           

Write the end of an extension operation.

 voidendInsert()           

Write the end of an insert operation.

 voidendUpdate()           

Write the end of an update operation.

 ResponseWritergetWrapped()           

Return the wrapped ResponseWriter instance.

 voidredirect(java.lang.String url)           

Write a redirect operation.

 voidstartDocument()           

Write the start of a partial response.

 voidstartError(java.lang.String errorName)           

Write the start of an error.

 voidstartEval()           

Write the start of an eval operation.

 voidstartExtension(java.util.Map<java.lang.String,java.lang.String> attributes)           

Write the start of an extension operation.

 voidstartInsertAfter(java.lang.String targetId)           

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

 voidstartInsertBefore(java.lang.String targetId)           

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

 voidstartUpdate(java.lang.String targetId)           

Write the start of an update operation.

 voidupdateAttributes(java.lang.String targetId, java.util.Map<java.lang.String,java.lang.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, writeText, writeText, writeText, writeURIAttribute
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDER_ALL_MARKER

public static final java.lang.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 java.lang.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 interface FacesWrapper<ResponseWriter>
Specified by:
getWrapped in class ResponseWriterWrapper
Since:
2.0
See Also:
ResponseWriterWrapper#getWrapped()

startDocument

public void startDocument()
                   throws java.io.IOException

Write the start of a partial response.

Overrides:
startDocument in class ResponseWriterWrapper
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0
See Also:
ResponseWriter#startDocument()

endDocument

public void endDocument()
                 throws java.io.IOException

Write the end of a partial response.

Overrides:
endDocument in class ResponseWriterWrapper
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0
See Also:
ResponseWriter#endDocument()

startInsertBefore

public void startInsertBefore(java.lang.String targetId)
                       throws java.io.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:
java.io.IOException - if an input/output error occurs
Since:
2.0

startInsertAfter

public void startInsertAfter(java.lang.String targetId)
                      throws java.io.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:
java.io.IOException - if an input/output error occurs
Since:
2.0

endInsert

public void endInsert()
               throws java.io.IOException

Write the end of an insert operation.

Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

startUpdate

public void startUpdate(java.lang.String targetId)
                 throws java.io.IOException

Write the start of an update operation.

Parameters:
targetId - ID of the node to be updated
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

endUpdate

public void endUpdate()
               throws java.io.IOException

Write the end of an update operation.

Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

updateAttributes

public void updateAttributes(java.lang.String targetId,
                             java.util.Map<java.lang.String,java.lang.String> attributes)
                      throws java.io.IOException

Write an attribute update operation.

Parameters:
targetId - ID of the node to be updated
attributes - Map of attribute name/value pairs to be updated
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

delete

public void delete(java.lang.String targetId)
            throws java.io.IOException

Write a delete operation.

Parameters:
targetId - ID of the node to be deleted
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

redirect

public void redirect(java.lang.String url)
              throws java.io.IOException

Write a redirect operation.

Parameters:
url - URL to redirect to
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

startEval

public void startEval()
               throws java.io.IOException

Write the start of an eval operation.

Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

endEval

public void endEval()
             throws java.io.IOException

Write the end of an eval operation.

Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

startExtension

public void startExtension(java.util.Map<java.lang.String,java.lang.String> attributes)
                    throws java.io.IOException

Write the start of an extension operation.

Parameters:
attributes - String name/value pairs for extension element attributes
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

endExtension

public void endExtension()
                  throws java.io.IOException

Write the end of an extension operation.

Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

startError

public void startError(java.lang.String errorName)
                throws java.io.IOException

Write the start of an error.

Parameters:
errorName - Descriptive string for the error
Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

endError

public void endError()
              throws java.io.IOException

Write the end of an error.

Throws:
java.io.IOException - if an input/output error occurs
Since:
2.0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值