KickJava   Java API By Example, From Geeks To Geeks.

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


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 ChatEmailSubjectTag extends javax.servlet.jsp.tagext.TagSupport JavaDoc
18 {
19     
20     /** Holds value of property width. */
21     private String JavaDoc width;
22     
23     /** Creates a new instance of ChatTranscriptTag */
24     public ChatEmailSubjectTag()
25     {
26     }
27     
28     public int doStartTag()
29     {
30         try
31         {
32             JspWriter out = pageContext.getOut();
33             HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
34
35             out.print("<input type=\"TEXT\" name=\"subject\"");
36             
37             if (width != null)
38             {
39                 out.print (" size=\"" + width + "\"");
40             }
41             
42             String JavaDoc value = ((ContactCenterEmailForm)(request.getAttribute("formBean"))).getSubject();
43             
44             out.println(" value=\"" + value + "\">");
45             
46         }
47         catch (IOException ex)
48         {
49             return SKIP_PAGE;
50         }
51         
52         return EVAL_PAGE;
53     }
54     
55     /** Getter for property width.
56      * @return Value of property width.
57      *
58      */

59     public String JavaDoc getWidth()
60     {
61         return this.width;
62     }
63     
64     /** Setter for property width.
65      * @param width New value of property width.
66      *
67      */

68     public void setWidth(String JavaDoc width)
69     {
70         this.width = width;
71     }
72     
73 }
74
Popular Tags