KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Common base tag class for HtmlSelectOneMenu and HtmlSelectManyMenu components.
25  *
26  * @author Manfred Geiler (latest modification by $Author: matzew $)
27  * @author Martin Marinschek
28  * @version $Revision: 1.4 $ $Date: 2005/02/18 18:24:35 $
29  * $Log: HtmlSelectMenuTagBase.java,v $
30  * Revision 1.4 2005/02/18 18:24:35 matzew
31  * added release() to tag clazzes.
32  *
33  * Revision 1.3 2004/10/13 11:51:01 matze
34  * renamed packages to org.apache
35  *
36  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
37  * ASF switch
38  *
39  * Revision 1.1 2004/04/01 12:57:44 manolito
40  * additional extended component classes for user role support
41  *
42  */

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

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

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

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

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

69     // UISelectMany attributes
70
//selectedValues cannot be set here, is set in JSP-parsing
71

72     //HtmlSelectManyMenu Attributes
73
private String JavaDoc _border;
74     
75     public void release() {
76         super.release();
77         _datafld=null;
78         _datasrc=null;
79         _dataformatas=null;
80         _disabled=null;
81         _name=null;
82         _onblur=null;
83         _onchange=null;
84         _onfocus=null;
85         _onselect=null;
86         _tabindex=null;
87         _border=null;
88     }
89
90     protected void setProperties(UIComponent component)
91     {
92         super.setProperties(component);
93
94         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
95         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
96         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
97         setBooleanProperty(component, HTML.DISABLED_ATTR, _disabled);
98         setStringProperty(component, HTML.NAME_ATTR, _name);
99         setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
100         setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
101         setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
102         setStringProperty(component, HTML.ONSELECT_ATTR, _onselect);
103         setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
104
105         setIntegerProperty(component, HTML.BORDER_ATTR, _border);
106    }
107
108     public void setBorder(String JavaDoc border)
109     {
110         _border = border;
111     }
112
113     public void setDatafld(String JavaDoc datafld)
114     {
115         _datafld = datafld;
116     }
117
118     public void setDatasrc(String JavaDoc datasrc)
119     {
120         _datasrc = datasrc;
121     }
122
123     public void setDataformatas(String JavaDoc dataformatas)
124     {
125         _dataformatas = dataformatas;
126     }
127
128     public void setDisabled(String JavaDoc disabled)
129     {
130         _disabled = disabled;
131     }
132
133     public void setName(String JavaDoc name)
134     {
135         _name = name;
136     }
137
138     public void setOnblur(String JavaDoc onblur)
139     {
140         _onblur = onblur;
141     }
142
143     public void setOnchange(String JavaDoc onchange)
144     {
145         _onchange = onchange;
146     }
147
148     public void setOnfocus(String JavaDoc onfocus)
149     {
150         _onfocus = onfocus;
151     }
152
153     public void setOnselect(String JavaDoc onselect)
154     {
155         _onselect = onselect;
156     }
157
158     public void setTabindex(String JavaDoc tabindex)
159     {
160         _tabindex = tabindex;
161     }
162
163 }
164
Popular Tags