KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > faces > webapp > UIComponentBodyTag


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package javax.faces.webapp;
17
18 import javax.servlet.jsp.JspException JavaDoc;
19 import javax.servlet.jsp.JspWriter JavaDoc;
20 import javax.servlet.jsp.tagext.BodyContent JavaDoc;
21 import javax.servlet.jsp.tagext.BodyTag JavaDoc;
22
23 /**
24  * @author Manfred Geiler (latest modification by $Author: mwessendorf $)
25  * @version $Revision: 1.6 $ $Date: 2004/07/01 22:00:54 $
26  */

27 public abstract class UIComponentBodyTag
28     extends UIComponentTag
29     implements BodyTag JavaDoc
30 {
31     private BodyContent JavaDoc _bodyContent;
32
33     public int doAfterBody()
34             throws JspException JavaDoc
35     {
36         return getDoAfterBodyValue();
37     }
38
39     public void doInitBody()
40             throws JspException JavaDoc
41     {
42     }
43
44     public void release()
45     {
46         super.release();
47         _bodyContent = null;
48     }
49
50     public BodyContent JavaDoc getBodyContent()
51     {
52         return _bodyContent;
53     }
54
55     public void setBodyContent(BodyContent JavaDoc bodyContent)
56     {
57         _bodyContent = bodyContent;
58     }
59
60     public JspWriter JavaDoc getPreviousOut()
61     {
62         return _bodyContent.getEnclosingWriter();
63     }
64
65     protected int getDoStartValue()
66             throws JspException JavaDoc
67     {
68         return BodyTag.EVAL_BODY_BUFFERED;
69     }
70
71     protected int getDoAfterBodyValue()
72             throws JspException JavaDoc
73     {
74         return BodyTag.SKIP_BODY;
75     }
76
77 }
78
Popular Tags