Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/faces/webapp/UIComponentBodyTag.java


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;
19  import javax.servlet.jsp.JspWriter;
20  import javax.servlet.jsp.tagext.BodyContent;
21  import javax.servlet.jsp.tagext.BodyTag;
22  
23  /**
24   * @author Manfred Geiler (latest modification by $Author: oros $)
25   * @version $Revision: 265611 $ $Date: 2005-08-31 21:05:16 -0400 (Wed, 31 Aug 2005) $
26   */
27  public abstract class UIComponentBodyTag
28      extends UIComponentTag
29      implements BodyTag
30  {
31      // API field
32      protected BodyContent bodyContent;
33  
34      
35      public int doAfterBody()
36              throws JspException
37      {
38          return getDoAfterBodyValue();
39      }
40  
41      public void doInitBody()
42              throws JspException
43      {
44      }
45  
46      public void release()
47      {
48          super.release();
49          bodyContent = null;
50      }
51  
52      public BodyContent getBodyContent()
53      {
54          return bodyContent;
55      }
56  
57      public void setBodyContent(BodyContent bodyContent)
58      {
59          this.bodyContent = bodyContent;
60      }
61  
62      public JspWriter getPreviousOut()
63      {
64          return bodyContent.getEnclosingWriter();
65      }
66  
67      protected int getDoStartValue()
68              throws JspException
69      {
70          return BodyTag.EVAL_BODY_BUFFERED;
71      }
72  
73      protected int getDoAfterBodyValue()
74              throws JspException
75      {
76          return BodyTag.SKIP_BODY;
77      }
78  
79  }