org.zkoss.zk.ui.render
Class Out

java.lang.Object
  extended by org.zkoss.zk.ui.render.Out

public class Out
extends java.lang.Object

A utility to simulate DSP's out action. It is designed to simplify the job to port DSP to ComponentRenderer.

For example,
new Out(self.getLabel()).setMaxlength(maxlen).render(out);

Since:
3.0.0
Author:
jumperchen, tomyeh

Constructor Summary
Out(java.lang.String value)
           
 
Method Summary
 boolean getEscapeXML()
          Returns whether to escape XML.
 int getMaxlength()
          Returns the maxlength of bytes to output.
 boolean getNbsp()
          Returns whether to generate   if the content is empty.
 java.lang.String getValue()
          Returns the value.
 void render(java.io.Writer out)
          Generates the output to the specified writer.
 Out setEscapeXML(boolean escapeXML)
          Sets whether to escape XML.
 Out setMaxlength(int maxlength)
          Sets the maxlength to output.
 Out setNbsp(boolean nbsp)
          Sets whether to generate   if the content is empty.
 Out setValue(java.lang.String value)
          Sets the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Out

public Out(java.lang.String value)
Method Detail

getEscapeXML

public boolean getEscapeXML()
Returns whether to escape XML. Default: true.


setEscapeXML

public Out setEscapeXML(boolean escapeXML)
Sets whether to escape XML.


getNbsp

public boolean getNbsp()
Returns whether to generate   if the content is empty. Default: false.


setNbsp

public Out setNbsp(boolean nbsp)
Sets whether to generate   if the content is empty.


getValue

public java.lang.String getValue()
Returns the value.


setValue

public Out setValue(java.lang.String value)
Sets the value.


getMaxlength

public int getMaxlength()
Returns the maxlength of bytes to output.

Default: 0 (no limit).


setMaxlength

public Out setMaxlength(int maxlength)
Sets the maxlength to output.


render

public void render(java.io.Writer out)
            throws java.io.IOException
Generates the output to the specified writer.

Throws:
java.io.IOException


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