KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > components > TextArea


1 package com.opensymphony.webwork.components;
2
3 import com.opensymphony.xwork.util.OgnlValueStack;
4
5 import javax.servlet.http.HttpServletRequest JavaDoc;
6 import javax.servlet.http.HttpServletResponse JavaDoc;
7
8 /**
9  * User: plightbo
10  * Date: Jul 20, 2005
11  * Time: 6:57:53 AM
12  */

13 public class TextArea extends UIBean {
14     final public static String JavaDoc TEMPLATE = "textarea";
15
16     protected String JavaDoc cols;
17     protected String JavaDoc readonly;
18     protected String JavaDoc rows;
19     protected String JavaDoc wrap;
20
21     public TextArea(OgnlValueStack stack, HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
22         super(stack, request, response);
23     }
24
25     protected String JavaDoc getDefaultTemplate() {
26         return TEMPLATE;
27     }
28
29     public void evaluateExtraParams() {
30         super.evaluateExtraParams();
31
32         if (readonly != null) {
33             addParameter("readonly", findValue(readonly, Boolean JavaDoc.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 JavaDoc cols) {
50         this.cols = cols;
51     }
52
53     public void setReadonly(String JavaDoc readonly) {
54         this.readonly = readonly;
55     }
56
57     public void setRows(String JavaDoc rows) {
58         this.rows = rows;
59     }
60
61     public void setWrap(String JavaDoc wrap) {
62         this.wrap = wrap;
63     }
64 }
65
Popular Tags