KickJava   Java API By Example, From Geeks To Geeks.

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


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 18:24:35 $
28  * $Log: HtmlSelectManyCheckboxTagBase.java,v $
29  * Revision 1.4 2005/02/18 18:24:35 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/04/01 12:57:44 manolito
39  * additional extended component classes for user role support
40  *
41  */

42 public abstract class HtmlSelectManyCheckboxTagBase
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 checkbox-list
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 _size; //TODO: needed?
66
private String JavaDoc _tabindex;
67
68     // UIInput attributes
69
// --> already implemented in HtmlInputTagBase
70

71     // UISelectMany attributes
72
//selectedValues cannot be set here, is set in JSP-parsing
73

74     // HTMLSelectManyAttributes attributes
75
private String JavaDoc _disabledClass;
76     private String JavaDoc _enabledClass;
77     private String JavaDoc _layout;
78     
79     //FIXME: here there is no border element, in the others
80
// (HTMLSelectOneMenuTag, HtmlSelectOneRadioTag)
81
// there is... inconsistent...
82
//private String _border;
83

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