KickJava   Java API By Example, From Geeks To Geeks.

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


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

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