KickJava   Java API By Example, From Geeks To Geeks.

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


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

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