1 package com.opensymphony.webwork.components; 2 3 import com.opensymphony.xwork.util.OgnlValueStack; 4 5 import javax.servlet.http.HttpServletRequest ; 6 import javax.servlet.http.HttpServletResponse ; 7 8 13 public class TextArea extends UIBean { 14 final public static String TEMPLATE = "textarea"; 15 16 protected String cols; 17 protected String readonly; 18 protected String rows; 19 protected String wrap; 20 21 public TextArea(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { 22 super(stack, request, response); 23 } 24 25 protected String getDefaultTemplate() { 26 return TEMPLATE; 27 } 28 29 public void evaluateExtraParams() { 30 super.evaluateExtraParams(); 31 32 if (readonly != null) { 33 addParameter("readonly", findValue(readonly, Boolean .class)); 34 } 35 36 if (cols != null) { 37 addParameter("cols", findString(cols)); 38 } 39 40 if (rows != null) { 41 addParameter("rows", findString(rows)); 42 } 43 44 if (wrap != null) { 45 addParameter("wrap", findString(wrap)); 46 } 47 } 48 49 public void setCols(String cols) { 50 this.cols = cols; 51 } 52 53 public void setReadonly(String readonly) { 54 this.readonly = readonly; 55 } 56 57 public void setRows(String rows) { 58 this.rows = rows; 59 } 60 61 public void setWrap(String wrap) { 62 this.wrap = wrap; 63 } 64 } 65 | Popular Tags |