KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > faces > taglib > WriteTag


1 /*
2  * Copyright 2002-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
17 package org.apache.struts.faces.taglib;
18
19
20 import javax.faces.component.UIComponent;
21
22
23 /**
24  * <p>Write the content of the specified component, converting to text
25  * as necessary first, for the
26  * <em>Struts-Faces Integration Library</em>.</p>
27  *
28  *
29  * @version $Rev: 54934 $ $Date: 2004-10-16 18:07:50 +0100 (Sat, 16 Oct 2004) $
30  */

31
32 public class WriteTag extends AbstractFacesTag {
33
34
35     // --------------------------------------------------------- Tag Attributes
36

37
38     /**
39      * <p>Flag indicating that rendered content should be filtered for
40      * characters that are sensitive in HTML.</p>
41      */

42     private String JavaDoc filter = null;
43
44     public void setFilter(String JavaDoc filter) {
45         this.filter = filter;
46     }
47
48
49     // ---------------------------------------------------------- Public Methods
50

51
52     /**
53      * <p>Return the type of component to be created for this tag.</p>
54      */

55     public String JavaDoc getComponentType() {
56
57         return ("org.apache.struts.faces.Write");
58
59     }
60
61
62     /**
63      * <p>Return the <code>rendererType</code> to be used for rendering
64      * our component.</p>
65      */

66     public String JavaDoc getRendererType() {
67
68         return ("org.apache.struts.faces.Write");
69
70     }
71
72
73     /**
74      * <p>Release resources allocated to this tag instance.</p>
75      */

76     public void release() {
77
78         super.release();
79         this.filter = null;
80
81     }
82
83
84     // ------------------------------------------------------- Protected Methods
85

86
87     /**
88      * <p>Override attributes set on this tag instance.</p>
89      *
90      * @param component Component whose attributes should be overridden
91      */

92     protected void setProperties(UIComponent component) {
93
94         super.setProperties(component);
95         setBooleanAttribute(component, "filter", filter);
96
97     }
98
99
100 }
101
Popular Tags