1 15 package org.apache.tapestry.valid; 16 17 import java.io.Serializable ; 18 19 import org.apache.tapestry.IMarkupWriter; 20 import org.apache.tapestry.IRender; 21 import org.apache.tapestry.IRequestCycle; 22 23 29 30 public class RenderString implements IRender, Serializable 31 { 32 private static final long serialVersionUID = 6215074338439140780L; 33 34 private String _string; 35 36 private boolean _raw = false; 37 38 public RenderString(String string) 39 { 40 _string = string; 41 } 42 43 50 51 public RenderString(String string, boolean raw) 52 { 53 _string = string; 54 _raw = raw; 55 } 56 57 61 62 public void render(IMarkupWriter writer, IRequestCycle cycle) 63 { 64 if (_string == null) 65 return; 66 67 writer.print(_string, _raw); 68 } 69 70 public String getString() 71 { 72 return _string; 73 } 74 75 public boolean isRaw() 76 { 77 return _raw; 78 } 79 80 85 86 public String toString() 87 { 88 return _string; 89 } 90 } | Popular Tags |