KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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

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

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

53     // HTML input attributes relevant for radio
54
private String JavaDoc _accesskey;
55     private String JavaDoc _alt;
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     // HTMLSelectOneRadio attributes
71
private String JavaDoc _border;
72     private String JavaDoc _disabledClass;
73     private String JavaDoc _enabledClass;
74     private String JavaDoc _layout;
75
76     public void release() {
77         super.release();
78
79         _accesskey=null;
80         _alt=null;
81         _datafld=null;
82         _datasrc=null;
83         _dataformatas=null;
84         _disabled=null;
85         _onblur=null;
86         _onchange=null;
87         _onfocus=null;
88         _onselect=null;
89         _readonly=null;
90         _tabindex=null;
91         _border=null;
92         _disabledClass=null;
93         _enabledClass=null;
94         _layout=null;
95     }
96     
97     protected void setProperties(UIComponent component)
98     {
99         super.setProperties(component);
100
101         setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey);
102         setStringProperty(component, HTML.ALT_ATTR, _alt);
103         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
104         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
105         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
106         setBooleanProperty(component, HTML.DISABLED_ATTR, _disabled);
107         setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
108         setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
109         setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
110         setStringProperty(component, HTML.ONSELECT_ATTR, _onselect);
111         setBooleanProperty(component, HTML.READONLY_ATTR, _readonly);
112         setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
113
114         setIntegerProperty(component, JSFAttr.BORDER_ATTR, _border);
115         setStringProperty(component, JSFAttr.DISABLED_CLASS_ATTR, _disabledClass);
116         setStringProperty(component, JSFAttr.ENABLED_CLASS_ATTR, _enabledClass);
117         setStringProperty(component, JSFAttr.LAYOUT_ATTR, _layout);
118     }
119
120     public void setAccesskey(String JavaDoc accesskey)
121     {
122         _accesskey = accesskey;
123     }
124
125     public void setAlt(String JavaDoc alt)
126     {
127         _alt = alt;
128     }
129
130     public void setBorder(String JavaDoc border)
131     {
132         _border = border;
133     }
134
135     public void setDatafld(String JavaDoc datafld)
136     {
137         _datafld = datafld;
138     }
139
140     public void setDatasrc(String JavaDoc datasrc)
141     {
142         _datasrc = datasrc;
143     }
144
145     public void setDataformatas(String JavaDoc dataformatas)
146     {
147         _dataformatas = dataformatas;
148     }
149
150     public void setDisabled(String JavaDoc disabled)
151     {
152         _disabled = disabled;
153     }
154
155     public void setOnblur(String JavaDoc onblur)
156     {
157         _onblur = onblur;
158     }
159
160     public void setOnchange(String JavaDoc onchange)
161     {
162         _onchange = onchange;
163     }
164
165     public void setOnfocus(String JavaDoc onfocus)
166     {
167         _onfocus = onfocus;
168     }
169
170     public void setOnselect(String JavaDoc onselect)
171     {
172         _onselect = onselect;
173     }
174
175     public void setReadonly(String JavaDoc readonly)
176     {
177         _readonly = readonly;
178     }
179
180     public void setTabindex(String JavaDoc tabindex)
181     {
182         _tabindex = tabindex;
183     }
184
185     public void setDisabledClass(String JavaDoc disabledClass)
186     {
187         _disabledClass = disabledClass;
188     }
189
190     public void setEnabledClass(String JavaDoc enabledClass)
191     {
192         _enabledClass = enabledClass;
193     }
194
195     public void setLayout(String JavaDoc layout)
196     {
197         _layout = layout;
198     }
199 }
200
Popular Tags