KickJava   Java API By Example, From Geeks To Geeks.

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


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.http.*;
10 import javax.servlet.jsp.*;
11 import java.io.*;
12
13 /**
14  *
15  * @author amit
16  */

17 public class ChatUserInfoAdditionalInfoTag extends javax.servlet.jsp.tagext.TagSupport JavaDoc
18 {
19     
20     /** Holds value of property rows. */
21     private String JavaDoc rows;
22     
23     /** Holds value of property cols. */
24     private String JavaDoc cols;
25     
26     /** Creates a new instance of ChatTranscriptTag */
27     public ChatUserInfoAdditionalInfoTag()
28     {
29     }
30     
31     public int doStartTag()
32     {
33         try
34         {
35             JspWriter out = pageContext.getOut();
36             HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
37             
38             out.print("<textarea name=\"addnl\"");
39             
40             if (cols != null)
41             {
42                 out.print (" cols=\"" + cols + "\"");
43             }
44             
45             if (rows != null)
46             {
47                 out.print (" rows=\"" + rows + "\"");
48             }
49             
50             out.println (">");
51             
52             String JavaDoc value = ((ContactCenterUnrestrictedAccessForm)(request.getAttribute("formBean"))).getAdditionalInfo();
53             
54             out.println(value + "</textarea>");
55             
56         }
57         catch (IOException ex)
58         {
59             return SKIP_PAGE;
60         }
61         
62         return EVAL_PAGE;
63     }
64     
65     /** Getter for property rows.
66      * @return Value of property rows.
67      *
68      */

69     public String JavaDoc getRows()
70     {
71         return this.rows;
72     }
73     
74     /** Setter for property rows.
75      * @param rows New value of property rows.
76      *
77      */

78     public void setRows(String JavaDoc rows)
79     {
80         this.rows = rows;
81     }
82     
83     /** Getter for property cols.
84      * @return Value of property cols.
85      *
86      */

87     public String JavaDoc getCols()
88     {
89         return this.cols;
90     }
91     
92     /** Setter for property cols.
93      * @param cols New value of property cols.
94      *
95      */

96     public void setCols(String JavaDoc cols)
97     {
98         this.cols = cols;
99     }
100     
101 }
102
Popular Tags