KickJava   Java API By Example, From Geeks To Geeks.

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


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  * @version $Revision: 1.4 $ $Date: 2005/02/18 18:24:35 $
27  * $Log: HtmlInputTextTagBase.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 HtmlInputTextTagBase
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
53
private String JavaDoc _accesskey;
54     private String JavaDoc _align;
55     private String JavaDoc _alt; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do?
56
private String JavaDoc _datafld;
57     private String JavaDoc _datasrc;
58     private String JavaDoc _dataformatas;
59     private String JavaDoc _disabled;
60     private String JavaDoc _maxlength;
61     private String JavaDoc _onblur;
62     private String JavaDoc _onchange;
63     private String JavaDoc _onfocus;
64     private String JavaDoc _onselect;
65     private String JavaDoc _readonly;
66     private String JavaDoc _size;
67     private String JavaDoc _tabindex;
68
69     // UIOutput attributes
70
// value and converterId --> already implemented in UIComponentTagBase
71

72     // UIInput attributes
73
// --> already implemented in HtmlInputTagBase
74

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