KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > web > talk > jspbeans > ChatTextAreaTag


1 /*
2  * ChatTranscriptTag.java
3  *
4  * Created on April 4, 2004, 8:42 AM
5  */

6
7 package com.quikj.application.web.talk.jspbeans;
8
9 import javax.servlet.jsp.*;
10 import java.io.*;
11
12 /**
13  *
14  * @author amit
15  */

16 public class ChatTextAreaTag extends javax.servlet.jsp.tagext.TagSupport JavaDoc
17 {
18     
19     /** Holds value of property rows. */
20     private String JavaDoc rows = "2";
21     
22     /** Holds value of property columns. */
23     private String JavaDoc columns = "40";
24     
25     /** Creates a new instance of ChatTranscriptTag */
26     public ChatTextAreaTag()
27     {
28     }
29     
30     public int doStartTag()
31     {
32         try
33         {
34             JspWriter out = pageContext.getOut();
35  
36             out.println("<textarea name=\"text\" rows=\""
37             + rows
38             + "\" cols=\""
39             + columns
40             + "\" disabled"
41             + " onkeypress=\"return chat.keyPressed(event)\"></textarea>");
42             
43         }
44         catch (IOException ex)
45         {
46             return SKIP_PAGE;
47         }
48         
49         return EVAL_PAGE;
50     }
51     
52     /** Getter for property rows.
53      * @return Value of property rows.
54      *
55      */

56     public String JavaDoc getRows()
57     {
58         return this.rows;
59     }
60     
61     /** Setter for property rows.
62      * @param rows New value of property rows.
63      *
64      */

65     public void setRows(String JavaDoc rows)
66     {
67         this.rows = rows;
68     }
69     
70     /** Getter for property columns.
71      * @return Value of property columns.
72      *
73      */

74     public String JavaDoc getColumns()
75     {
76         return this.columns;
77     }
78     
79     /** Setter for property columns.
80      * @param columns New value of property columns.
81      *
82      */

83     public void setColumns(String JavaDoc columns)
84     {
85         this.columns = columns;
86     }
87     
88 }
89
Popular Tags