public class ComponentRedraws
extends java.lang.Object
ComponentCtrl.redraw(java.io.Writer)
.
Like HtmlPageRenders.getRenderContext(org.zkoss.zk.ui.Execution)
, they are used to simplify
the implementation of the component rendering. However, there are
some differences:
beforeRedraw(boolean)
and afterRedraw()
can be called
even without an execution (e.g., in a working thread).Constructor and Description |
---|
ComponentRedraws() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
afterRedraw()
Called after finishing the redrawing.
|
static int |
beforeRedraw(boolean includingPage)
Called before staring the redrawing.
|
static java.io.Writer |
getScriptBuffer()
Returns the string buffer for the snippet that shall be generated
after rendering the components.
|
public static final int beforeRedraw(boolean includingPage)
AbstractComponent.redraw(java.io.Writer)
calls this method
before calling AbstractComponent.renderProperties(org.zkoss.zk.ui.sys.ContentRenderer)
and AbstractComponent.redrawChildren(java.io.Writer)
.
If this method is called, afterRedraw()
must be called in
the finally clause:
ComponentRedraws.beforeRedraw(false);
try {
...
} finally {
ComponentRedraws.afterRedraw();
}
includingPage
- whether this invocation is caused to include a new page.
Unless for implementing an include component, this parameter shall be false.ComponentCtrl.redraw(java.io.Writer)
is called against.public static final java.io.Writer getScriptBuffer()
afterRedraw()
if it is called against
the top-level component.public static final java.lang.String afterRedraw()
beforeRedraw(boolean)
is called.getScriptBuffer()
and
append the snippet into the returned string buffer.Copyright © 2005-2011 Potix Corporation. All Rights Reserved.