KickJava   Java API By Example, From Geeks To Geeks.

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


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

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