org.apache.tapestry.valid
Class RenderString

java.lang.Object
  extended by org.apache.tapestry.valid.RenderString
All Implemented Interfaces:
IRender

public class RenderString
extends Object
implements IRender

A wrapper around Stringthat allows the String to be renderred. This is primarily used to present error messages.

Author:
Howard Lewis Ship

Constructor Summary
RenderString(String string)
           
RenderString(String string, boolean raw)
           
 
Method Summary
 String getString()
           
 boolean isRaw()
           
 void render(IMarkupWriter writer, IRequestCycle cycle)
          Renders the String to the writer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenderString

public RenderString(String string)

RenderString

public RenderString(String string,
                    boolean raw)
Parameters:
string - the string to render
raw - if true, the String is rendered as-is, with no filtering. If false (the default), the String is filtered.
Method Detail

render

public void render(IMarkupWriter writer,
                   IRequestCycle cycle)
Renders the String to the writer. Does nothing if the string is null. If raw is true, uses IMarkupWriter.printRaw(String), otherwise IMarkupWriter.print(String).

Specified by:
render in interface IRender

getString

public String getString()

isRaw

public boolean isRaw()

toString

public String toString()
Overrides:
toString in class Object