org.zkoss.zk.ui.render
Interface ComponentRenderer


public interface ComponentRenderer

A component renderer is used to render a component. In addition to DSP, JSP and other Servlet, a component can be rendered by use of a ComponentRenderer instance.

When AbstractComponent.redraw(java.io.Writer) is called, it retrieves the mold URI by calling AbstractComponent.getMoldURI(). Then, it returns either an URI or a ComponentRenderer instance. If URI, the component is rendered by use of Execution.include(java.io.Writer, java.lang.String, java.util.Map, int). If ComponentRenderer, render(org.zkoss.zk.ui.Component, java.io.Writer) is called directly.

Note: an instance of ComponentRenderer is shared among all components of associated types.

The use of ComponentRenderer is mainly to speed up the performance.

Author:
tomyeh
See Also:
Component.redraw(java.io.Writer), AbstractComponent.redraw(java.io.Writer)

Method Summary
 void render(Component comp, java.io.Writer out)
          Redraws a component.
 

Method Detail

render

void render(Component comp,
            java.io.Writer out)
            throws java.io.IOException
Redraws a component.

Parameters:
comp - the component (never null).
out - the writer to generate the output (never null).
Throws:
java.io.IOException


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.