public class LayoutWriter extends Writer
LayoutDefinitionTag
from rendering more than once when LayoutRenderTags and LayoutComponentTags are
nested within it. The definition tag silences output during a component render phase, and the
component that wishes to render turns output back on during its body evaluation.| Constructor and Description |
|---|
LayoutWriter(JspWriter out)
Create a new layout writer that wraps the given JSP writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Calls
JspWriter.clear() on the wrapped JSP writer. |
void |
close() |
String |
closeBuffer(PageContext pageContext)
Flush the page context's output buffer and resume sending output to the writer that was
receiving output prior to calling
openBuffer(PageContext). |
void |
flush() |
protected Writer |
getOut()
Get the writer to which output is currently being written.
|
boolean |
isSilent()
If true, then discard all output.
|
void |
openBuffer(PageContext pageContext)
Flush the page context's output buffer and redirect output into a buffer.
|
void |
setSilent(boolean silent,
PageContext pageContext)
Enable or disable silent mode.
|
protected void |
tryFlush(PageContext pageContext)
Try to flush the page context's output buffer.
|
void |
write(char[] cbuf,
int off,
int len) |
public LayoutWriter(JspWriter out)
out - The JSP writer to which output will be written.protected Writer getOut()
public boolean isSilent()
public void setSilent(boolean silent,
PageContext pageContext)
throws IOException
silent - True to silence output, false to enable output.pageContext - The page context in use at the time output is to be silenced.IOException - If an error occurs writing to output.public void openBuffer(PageContext pageContext)
closeBuffer(PageContext).public String closeBuffer(PageContext pageContext)
openBuffer(PageContext).protected void tryFlush(PageContext pageContext)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionpublic void clear()
throws IOException
JspWriter.clear() on the wrapped JSP writer.IOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOException© Copyright 2005-2006, Stripes Development Team.