KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > ext > HtmlOutputTextTag


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.taglib.html.ext;
17
18 import org.apache.myfaces.component.UserRoleAware;
19 import org.apache.myfaces.component.html.ext.HtmlOutputText;
20 import org.apache.myfaces.taglib.html.HtmlOutputTextTagBase;
21
22 import javax.faces.component.UIComponent;
23
24 /**
25  * @author Manfred Geiler (latest modification by $Author: matzew $)
26  * @version $Revision: 1.8 $ $Date: 2005/02/18 17:19:29 $
27  * $Log: HtmlOutputTextTag.java,v $
28  * Revision 1.8 2005/02/18 17:19:29 matzew
29  * added release() to tag clazzes.
30  *
31  * Revision 1.7 2005/01/10 07:57:29 matzew
32  * closed MyFace-76. Thanks to sean schofield
33  *
34  * Revision 1.6 2004/10/13 11:50:59 matze
35  * renamed packages to org.apache
36  *
37  * Revision 1.5 2004/07/01 21:53:06 mwessendorf
38  * ASF switch
39  *
40  * Revision 1.4 2004/05/18 15:07:12 manolito
41  * no message
42  *
43  * Revision 1.3 2004/05/18 14:31:38 manolito
44  * user role support completely moved to components source tree
45  *
46  * Revision 1.2 2004/04/05 11:04:55 manolito
47  * setter for renderer type removed, no more default renderer type needed
48  *
49  * Revision 1.1 2004/04/01 12:57:42 manolito
50  * additional extended component classes for user role support
51  *
52  */

53 public class HtmlOutputTextTag
54         extends HtmlOutputTextTagBase
55 {
56     public String JavaDoc getComponentType()
57     {
58         return HtmlOutputText.COMPONENT_TYPE;
59     }
60
61     public String JavaDoc getRendererType()
62     {
63         return "org.apache.myfaces.Text";
64     }
65
66     private String JavaDoc _enabledOnUserRole;
67     private String JavaDoc _visibleOnUserRole;
68
69     public void release() {
70         super.release();
71         _enabledOnUserRole=null;
72         _visibleOnUserRole=null;
73    }
74     
75     protected void setProperties(UIComponent component)
76     {
77         super.setProperties(component);
78         setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
79         setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
80     }
81
82     public void setEnabledOnUserRole(String JavaDoc enabledOnUserRole)
83     {
84         _enabledOnUserRole = enabledOnUserRole;
85     }
86
87     public void setVisibleOnUserRole(String JavaDoc visibleOnUserRole)
88     {
89         _visibleOnUserRole = visibleOnUserRole;
90     }
91
92 }
93
Popular Tags