KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > stylesheet > StylesheetTag


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 org.apache.myfaces.custom.stylesheet;
17
18 import javax.faces.component.UIComponent;
19
20 import org.apache.myfaces.taglib.html.HtmlOutputTextTagBase;
21
22 /**
23  * @author mwessendorf (latest modification by $Author: matzew $)
24  * @version $Revision: 1.3 $ $Date: 2005/02/18 17:19:31 $
25  * $Log: StylesheetTag.java,v $
26  * Revision 1.3 2005/02/18 17:19:31 matzew
27  * added release() to tag clazzes.
28  *
29  * Revision 1.2 2004/10/13 11:50:58 matze
30  * renamed packages to org.apache
31  *
32  * Revision 1.1 2004/08/18 15:36:08 mwessendorf
33  * added a new Stylesheet-Component
34  *
35 */

36 public class StylesheetTag extends HtmlOutputTextTagBase {
37
38
39     private String JavaDoc _path = null;
40     // User Role support
41
private String JavaDoc _enabledOnUserRole;
42     private String JavaDoc _visibleOnUserRole;
43
44     public String JavaDoc getComponentType() {
45
46         return Stylesheet.COMPONENT_TYPE;
47
48     }
49
50     public String JavaDoc getRendererType() {
51
52         return "org.apache.myfaces.Stylesheet";
53
54     }
55
56
57      public void release() {
58
59         super.release();
60         _path=null;
61         _enabledOnUserRole=null;
62         _visibleOnUserRole=null;
63
64
65     }
66  
67      /**
68      * overrides setProperties() form UIComponentTag.
69      */

70     protected void setProperties(UIComponent component) {
71
72         super.setProperties(component);
73         setStringProperty(component, "path", _path);
74
75     }
76     
77     //---------------------------------------------only the Setters
78

79     public void setPath(String JavaDoc path) {
80         this._path = path;
81     }
82     public void setEnabledOnUserRole(String JavaDoc string) {
83         _enabledOnUserRole = string;
84     }
85
86     public void setVisibleOnUserRole(String JavaDoc string) {
87         _visibleOnUserRole = string;
88     }
89 }
Popular Tags