1 15 package org.apache.tapestry.form; 16 17 import org.apache.tapestry.IMarkupWriter; 18 import org.apache.tapestry.IRequestCycle; 19 20 31 public abstract class TextArea extends AbstractValidatableField 32 { 33 public abstract String getValue(); 34 35 public abstract void setValue(String value); 36 37 40 public void render(IMarkupWriter writer, IRequestCycle cycle, String value) 41 { 42 renderDelegatePrefix(writer, cycle); 43 44 writer.begin("textarea"); 45 46 writer.attribute("name", getName()); 47 48 if (isDisabled()) 49 writer.attribute("disabled", "disabled"); 50 51 renderIdAttribute(writer, cycle); 52 53 renderDelegateAttributes(writer, cycle); 54 55 renderContributions(writer, cycle); 56 57 renderInformalParameters(writer, cycle); 58 59 if (value != null) 60 writer.print(value); 61 62 writer.end(); 63 64 renderDelegateSuffix(writer, cycle); 65 } 66 67 70 public void writeValue(Object value) 71 { 72 setValue((String ) value); 73 } 74 75 78 public Object readValue() 79 { 80 return getValue(); 81 } 82 } | Popular Tags |