org.apache.tapestry.markup
Class NestedMarkupWriterImpl

java.lang.Object
  extended by org.apache.tapestry.markup.MarkupWriterImpl
      extended by org.apache.tapestry.markup.NestedMarkupWriterImpl
All Implemented Interfaces:
IMarkupWriter, NestedMarkupWriter

public class NestedMarkupWriterImpl
extends MarkupWriterImpl
implements NestedMarkupWriter

Nested implementation of IMarkupWriter. Accumulates content in a CharArrayWriter, and prints the buffered content (raw) on close().

Since:
4.0
Author:
Howard M. Lewis Ship
See Also:
IMarkupWriter.getNestedWriter()

Constructor Summary
NestedMarkupWriterImpl(IMarkupWriter parent, MarkupFilter filter)
           
 
Method Summary
 void close()
          Closes the internal CharArrayWriter, then captures its content and invokes IMarkupWriter.printRaw(String) on the parent markup writer (the writer that created this writer).
 String getBuffer()
          Returns any makrup so far accumulated by the nested markup writer.
 
Methods inherited from class org.apache.tapestry.markup.MarkupWriterImpl
appendAttribute, appendAttribute, appendAttribute, appendAttributeRaw, attribute, attribute, attribute, attribute, attributeRaw, begin, beginEmpty, checkError, clearAttributes, closeTag, comment, end, end, flush, getAttribute, getContentType, getNestedWriter, hasAttribute, print, print, print, print, print, print, println, printRaw, printRaw, removeAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IMarkupWriter
appendAttribute, appendAttribute, appendAttribute, appendAttributeRaw, attribute, attribute, attribute, attributeRaw, begin, beginEmpty, checkError, clearAttributes, closeTag, comment, end, end, flush, getAttribute, getContentType, getNestedWriter, hasAttribute, print, print, print, print, print, print, println, printRaw, printRaw, removeAttribute
 

Constructor Detail

NestedMarkupWriterImpl

public NestedMarkupWriterImpl(IMarkupWriter parent,
                              MarkupFilter filter)
Method Detail

getBuffer

public String getBuffer()
Description copied from interface: NestedMarkupWriter
Returns any makrup so far accumulated by the nested markup writer. When the nested markup writer is closed, it invokes IMarkupWriter.printRaw(String), with this content, on its parent markup writer.

Getting the buffer will close the writer.

Specified by:
getBuffer in interface NestedMarkupWriter

close

public void close()
Closes the internal CharArrayWriter, then captures its content and invokes IMarkupWriter.printRaw(String) on the parent markup writer (the writer that created this writer).

Specified by:
close in interface IMarkupWriter
Overrides:
close in class MarkupWriterImpl


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.