~ubuntu-branches/ubuntu/trusty/libstruts1.2-java/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/struts-faces/src/java/org/apache/struts/faces/taglib/WriteTag.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2004-11-19 15:35:25 UTC
  • Revision ID: james.westby@ubuntu.com-20041119153525-mdu08a76z4zo67xt
Tags: upstream-1.2.4
ImportĀ upstreamĀ versionĀ 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 $Revision: 1.8 $ $Date: 2004/07/08 01:11:28 $
 
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 filter = null;
 
43
 
 
44
    public void setFilter(String 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 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 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
}