KickJava   Java API By Example, From Geeks To Geeks.

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


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 ChatActionButtonTag 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 ChatActionButtonTag()
24     {
25     }
26     
27     public int doStartTag()
28     {
29         try
30         {
31             JspWriter out = pageContext.getOut();
32  
33             out.println("<input disabled type=\"submit\" name=\"action\" value=\""
34             + label
35             + "\" onclick='return chat.actionButtonClicked()'>");
36             
37         }
38         catch (IOException ex)
39         {
40             return SKIP_PAGE;
41         }
42         
43         return EVAL_PAGE;
44     }
45     
46     /** Getter for property label.
47      * @return Value of property label.
48      *
49      */

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

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