KickJava   Java API By Example, From Geeks To Geeks.

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


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 ChatSendButtonTag extends javax.servlet.jsp.tagext.TagSupport JavaDoc
17 {
18     
19     /** Holds value of property label. */
20     private String JavaDoc label = "Send";
21     
22     /** Creates a new instance of ChatTranscriptTag */
23     public ChatSendButtonTag()
24     {
25     }
26     
27     public int doStartTag()
28     {
29         try
30         {
31             JspWriter out = pageContext.getOut();
32  
33             out.println("<input type=\"submit\" name=\"send\" value=\""
34             + label + "\" disabled onclick=\"return chat.sendText();\">");
35             
36         }
37         catch (IOException ex)
38         {
39             return SKIP_PAGE;
40         }
41         
42         return EVAL_PAGE;
43     }
44     
45     /** Getter for property label.
46      * @return Value of property label.
47      *
48      */

49     public String JavaDoc getLabel()
50     {
51         return this.label;
52     }
53     
54     /** Setter for property label.
55      * @param label New value of property label.
56      *
57      */

58     public void setLabel(String JavaDoc label)
59     {
60         this.label = label;
61     }
62     
63 }
64
Popular Tags