1 10 package org.mmbase.util; 11 12 import java.util.*; 13 14 29 public class HTMLElementTextArea extends HTMLElement { 30 32 35 public HTMLElementTextArea() { 36 } 37 38 41 protected String generate() { 42 String html = ""; 43 if (moreValues) { 44 if (valuesList != null) { 45 String val = null; 46 Enumeration e = valuesList.elements(); 47 if (e.hasMoreElements()) { 48 val = (String ) e.nextElement(); 49 } 50 html += "<textarea name=\"" + name+"\" "; 51 if (cols != null) html += "cols=\"" + cols+"\" "; 52 if (rows != null) html += " rows=\"" + rows+"\" "; 53 html += ">"; 54 if (val != null) html += val; 55 html += "</textarea>"; 56 } 57 } else { 58 html += "<textarea name=\"" + name+"\" "; 59 if (cols != null) html += "cols=\"" + cols+"\" "; 60 if (rows != null) html += " rows=\"" + rows+"\" "; 61 html += ">"; 62 if (values != null) { 63 if (values.charAt(0) == '\"') { 64 html += values.substring(1,values.length()-1); 65 } else { 66 html += values; 67 } 68 } 69 html += "</textarea>"; 70 } 71 return html; 72 } 73 } 74 | Popular Tags |