1 64 65 package com.jcorporate.expresso.services.html; 66 67 72 73 import java.io.PrintWriter ; 74 75 76 80 public class TextArea 81 extends HtmlElement { 82 private int rows = 0; 83 private int cols = 0; 84 private String fieldName = null; 85 private String fieldValue = (""); 86 87 90 public TextArea() 91 throws HtmlException { 92 super(); 93 } 94 95 103 public TextArea(String newFieldName, String newFieldValue, int newRows, 104 int newCols) 105 throws HtmlException { 106 super(newFieldName); 107 fieldName = newFieldName; 108 fieldValue = newFieldValue; 109 rows = newRows; 110 cols = newCols; 111 } 112 113 117 public void display(PrintWriter out, int depth) 118 throws HtmlException { 119 this.padWithTabs(out, depth); 120 out.print("<textarea"); 121 122 if (cSSClass != null) { 123 out.print(" class=\"" + cSSClass + "\""); 124 } 125 if (cSSID != null) { 126 out.print(" id=\"" + cSSID + "\""); 127 } 128 129 out.println(" name=" + fieldName + " rows=\"" + rows + "\" cols=\"" + 130 cols + "\">"); 131 132 out.println(fieldValue); 134 135 out.println("</textarea>"); 137 setDisplayed(); 138 } 139 140 141 } 142 | Popular Tags |