1 16 17 package org.springframework.web.servlet.tags.form; 18 19 import javax.servlet.jsp.JspException ; 20 21 22 28 public class TextareaTag extends AbstractHtmlInputElementTag { 29 30 33 public static final String ROWS_ATTRIBUTE = "rows"; 34 35 38 public static final String COLS_ATTRIBUTE = "cols"; 39 40 43 public static final String ONSELECT_ATTRIBUTE = "onselect"; 44 45 46 49 private String rows; 50 51 54 private String cols; 55 56 59 private String onselect; 60 61 65 public void setRows(String rows) { 66 this.rows = rows; 67 } 68 69 73 protected String getRows() { 74 return this.rows; 75 } 76 77 81 public void setCols(String cols) { 82 this.cols = cols; 83 } 84 85 89 protected String getCols() { 90 return this.cols; 91 } 92 93 97 public void setOnselect(String onselect) { 98 this.onselect = onselect; 99 } 100 101 105 protected String getOnselect() { 106 return this.onselect; 107 } 108 109 110 protected int writeTagContent(TagWriter tagWriter) throws JspException { 111 tagWriter.startTag("textarea"); 112 writeDefaultAttributes(tagWriter); 113 writeOptionalAttribute(tagWriter, ROWS_ATTRIBUTE, getRows()); 114 writeOptionalAttribute(tagWriter, COLS_ATTRIBUTE, getCols()); 115 writeOptionalAttribute(tagWriter, ONSELECT_ATTRIBUTE, getOnselect()); 116 tagWriter.appendValue(getDisplayString(getBoundValue(), getPropertyEditor())); 117 tagWriter.endTag(); 118 return EVAL_PAGE; 119 } 120 121 } 122 | Popular Tags |