KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > albel > tags > table > HandlersTag


1 package albel.tags.table;
2
3 import javax.servlet.jsp.*;
4 import javax.servlet.*;
5 import javax.servlet.jsp.tagext.*;
6 import javax.servlet.http.*;
7 import albel.tags.table.utils.Writer;
8 import albel.tags.table.model.*;
9 /**
10  * @author albel
11  *Tag container for table handler tags
12  */

13 public class HandlersTag extends BodyTagSupport
14 {
15     
16     public HandlersTag()
17     {
18         super();
19     }
20     
21     ////////////////////////////////////////////////////////////////
22
/// ///
23
/// User methods. ///
24
/// ///
25
/// Modify these methods to customize your tag handler. ///
26
/// ///
27
////////////////////////////////////////////////////////////////
28

29     
30     //
31
// methods called from doStartTag()
32
//
33
/**
34      *
35      * Fill in this method to perform other operations from doStartTag().
36      *
37      */

38     public void otherDoStartTagOperations()
39     {
40         
41         //
42
// TODO: code that performs other operations in doStartTag
43
// should be placed here.
44
// It will be called after initializing variables,
45
// finding the parent, setting IDREFs, etc, and
46
// before calling theBodyShouldBeEvaluated().
47
//
48
// For example, to print something out to the JSP, use the following:
49
//
50
// try {
51
// JspWriter out = pageContext.getOut();
52
// out.println("something");
53
// } catch (java.io.IOException ex) {
54
// // do something
55
// }
56
//
57
//
58

59         
60     }
61     
62     /**
63      *
64      * Fill in this method to determine if the tag body should be evaluated
65      * Called from doStartTag().
66      *
67      */

68     public boolean theBodyShouldBeEvaluated()
69     {
70         
71         //
72
// TODO: code that determines whether the body should be
73
// evaluated should be placed here.
74
// Called from the doStartTag() method.
75
//
76
return true;
77         
78     }
79     
80     
81     //
82
// methods called from doEndTag()
83
//
84
/**
85      *
86      * Fill in this method to perform other operations from doEndTag().
87      *
88      */

89     public void otherDoEndTagOperations()
90     {
91         
92         //
93
// TODO: code that performs other operations in doEndTag
94
// should be placed here.
95
// It will be called after initializing variables,
96
// finding the parent, setting IDREFs, etc, and
97
// before calling shouldEvaluateRestOfPageAfterEndTag().
98
//
99

100         
101     }
102     
103     /**
104      *
105      * Fill in this method to determine if the rest of the JSP page
106      * should be generated after this tag is finished.
107      * Called from doEndTag().
108      *
109      */

110     public boolean shouldEvaluateRestOfPageAfterEndTag()
111     {
112         
113         //
114
// TODO: code that determines whether the rest of the page
115
// should be evaluated after the tag is processed
116
// should be placed here.
117
// Called from the doEndTag() method.
118
//
119
return true;
120         
121     }
122     
123     
124     ////////////////////////////////////////////////////////////////
125
/// ///
126
/// Tag Handler interface methods. ///
127
/// ///
128
/// Do not modify these methods; instead, modify the ///
129
/// methods that they call. ///
130
/// ///
131
////////////////////////////////////////////////////////////////
132

133     
134     /**
135      * Dummy javadoc comment to get things started.
136      */

137     public int doStartTag() throws JspException
138     {
139             return this.EVAL_BODY_INCLUDE;
140     }
141     
142     
143     /**
144      * Dummy javadoc comment to get things started.
145      */

146     public int doEndTag() throws JspException
147     {
148         // Dummy body to get things going.
149
return EVAL_PAGE;
150     }
151     
152 }
153
Popular Tags