KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > HtmlSelectBooleanCheckboxTagBase


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;
17
18 import org.apache.myfaces.renderkit.html.HTML;
19
20 import javax.faces.component.UIComponent;
21
22
23 /**
24  * @author Manfred Geiler (latest modification by $Author: matzew $)
25  * @author Martin Marinschek
26  * @version $Revision: 1.4 $ $Date: 2005/02/18 18:24:35 $
27  * $Log: HtmlSelectBooleanCheckboxTagBase.java,v $
28  * Revision 1.4 2005/02/18 18:24:35 matzew
29  * added release() to tag clazzes.
30  *
31  * Revision 1.3 2004/10/13 11:51:01 matze
32  * renamed packages to org.apache
33  *
34  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
35  * ASF switch
36  *
37  * Revision 1.1 2004/04/01 12:57:44 manolito
38  * additional extended component classes for user role support
39  *
40  */

41 public abstract class HtmlSelectBooleanCheckboxTagBase
42         extends HtmlInputTagBase
43 {
44     // UIComponent attributes --> already implemented in UIComponentTagBase
45

46     // user role attributes --> already implemented in UIComponentTagBase
47

48     // HTML universal attributes --> already implemented in HtmlComponentTagBase
49

50     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
51

52     // HTML input attributes relevant for checkbox-input
53
private String JavaDoc _accesskey;
54     private String JavaDoc _alt;
55     private String JavaDoc _checked;
56     private String JavaDoc _datafld;
57     private String JavaDoc _datasrc;
58     private String JavaDoc _dataformatas;
59     private String JavaDoc _disabled;
60     private String JavaDoc _onblur;
61     private String JavaDoc _onchange;
62     private String JavaDoc _onfocus;
63     private String JavaDoc _onselect;
64     private String JavaDoc _readonly;
65     private String JavaDoc _tabindex;
66
67     // UIInput attributes
68
// --> already implemented in HtmlInputTagBase
69

70     // UISelectBoolean attributes
71
//private String _selected; //is already covered by checked attribute
72

73     public void release() {
74         super.release();
75         _accesskey=null;
76         _alt=null;
77         _checked=null;
78         _datafld=null;
79         _datasrc=null;
80         _dataformatas=null;
81         _disabled=null;
82         _onblur=null;
83         _onchange=null;
84         _onfocus=null;
85         _onselect=null;
86         _readonly=null;
87         _tabindex=null;
88     }
89     
90     protected void setProperties(UIComponent component)
91     {
92         super.setProperties(component);
93
94         setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey);
95         setStringProperty(component, HTML.ALT_ATTR, _alt);
96         setBooleanProperty(component, HTML.CHECKED_ATTR, _checked);
97         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
98         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
99         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
100         setBooleanProperty(component, HTML.DISABLED_ATTR, _disabled);
101         setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
102         setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
103         setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
104         setStringProperty(component, HTML.ONSELECT_ATTR, _onselect);
105         setBooleanProperty(component, HTML.READONLY_ATTR, _readonly);
106         setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
107    }
108
109     public void setAccesskey(String JavaDoc accesskey)
110     {
111         _accesskey = accesskey;
112     }
113
114     public void setAlt(String JavaDoc alt)
115     {
116         _alt = alt;
117     }
118
119     public void setChecked(String JavaDoc checked)
120     {
121         _checked = checked;
122     }
123
124     public void setDatafld(String JavaDoc datafld)
125     {
126         _datafld = datafld;
127     }
128
129     public void setDatasrc(String JavaDoc datasrc)
130     {
131         _datasrc = datasrc;
132     }
133
134     public void setDataformatas(String JavaDoc dataformatas)
135     {
136         _dataformatas = dataformatas;
137     }
138
139     public void setDisabled(String JavaDoc disabled)
140     {
141         _disabled = disabled;
142     }
143
144     public void setOnblur(String JavaDoc onblur)
145     {
146         _onblur = onblur;
147     }
148
149     public void setOnchange(String JavaDoc onchange)
150     {
151         _onchange = onchange;
152     }
153
154     public void setOnfocus(String JavaDoc onfocus)
155     {
156         _onfocus = onfocus;
157     }
158
159     public void setOnselect(String JavaDoc onselect)
160     {
161         _onselect = onselect;
162     }
163
164     public void setReadonly(String JavaDoc readonly)
165     {
166         _readonly = readonly;
167     }
168
169     public void setTabindex(String JavaDoc tabindex)
170     {
171         _tabindex = tabindex;
172     }
173
174 }
175
Popular Tags