KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > faces > component > html > HtmlForm


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 javax.faces.component.html;
17
18 import javax.faces.component.UIForm;
19 import javax.faces.context.FacesContext;
20 import javax.faces.el.ValueBinding;
21
22 /**
23  * @author Thomas Spiegl (latest modification by $Author: mwessendorf $)
24  * @version $Revision: 1.2 $ $Date: 2004/07/01 22:01:16 $
25  */

26 public class HtmlForm extends UIForm
27 {
28     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
29

30     public static final String JavaDoc COMPONENT_TYPE = "javax.faces.HtmlForm";
31     private static final String JavaDoc DEFAULT_RENDERER_TYPE = "javax.faces.Form";
32     private static final String JavaDoc DEFAULT_ENCTYPE = "application/x-www-form-urlencoded";
33
34     private String JavaDoc _accept = null;
35     private String JavaDoc _acceptcharset = null;
36     private String JavaDoc _dir = null;
37     private String JavaDoc _enctype = null;
38     private String JavaDoc _lang = null;
39     private String JavaDoc _onclick = null;
40     private String JavaDoc _ondblclick = null;
41     private String JavaDoc _onkeydown = null;
42     private String JavaDoc _onkeypress = null;
43     private String JavaDoc _onkeyup = null;
44     private String JavaDoc _onmousedown = null;
45     private String JavaDoc _onmousemove = null;
46     private String JavaDoc _onmouseout = null;
47     private String JavaDoc _onmouseover = null;
48     private String JavaDoc _onmouseup = null;
49     private String JavaDoc _onreset = null;
50     private String JavaDoc _onsubmit = null;
51     private String JavaDoc _style = null;
52     private String JavaDoc _styleClass = null;
53     private String JavaDoc _target = null;
54     private String JavaDoc _title = null;
55
56     public HtmlForm()
57     {
58         setRendererType(DEFAULT_RENDERER_TYPE);
59     }
60
61
62     public void setAccept(String JavaDoc accept)
63     {
64         _accept = accept;
65     }
66
67     public String JavaDoc getAccept()
68     {
69         if (_accept != null) return _accept;
70         ValueBinding vb = getValueBinding("accept");
71         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
72     }
73
74     public void setAcceptcharset(String JavaDoc acceptcharset)
75     {
76         _acceptcharset = acceptcharset;
77     }
78
79     public String JavaDoc getAcceptcharset()
80     {
81         if (_acceptcharset != null) return _acceptcharset;
82         ValueBinding vb = getValueBinding("acceptcharset");
83         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
84     }
85
86     public void setDir(String JavaDoc dir)
87     {
88         _dir = dir;
89     }
90
91     public String JavaDoc getDir()
92     {
93         if (_dir != null) return _dir;
94         ValueBinding vb = getValueBinding("dir");
95         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
96     }
97
98     public void setEnctype(String JavaDoc enctype)
99     {
100         _enctype = enctype;
101     }
102
103     public String JavaDoc getEnctype()
104     {
105         if (_enctype != null) return _enctype;
106         ValueBinding vb = getValueBinding("enctype");
107         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : DEFAULT_ENCTYPE;
108     }
109
110     public void setLang(String JavaDoc lang)
111     {
112         _lang = lang;
113     }
114
115     public String JavaDoc getLang()
116     {
117         if (_lang != null) return _lang;
118         ValueBinding vb = getValueBinding("lang");
119         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
120     }
121
122     public void setOnclick(String JavaDoc onclick)
123     {
124         _onclick = onclick;
125     }
126
127     public String JavaDoc getOnclick()
128     {
129         if (_onclick != null) return _onclick;
130         ValueBinding vb = getValueBinding("onclick");
131         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
132     }
133
134     public void setOndblclick(String JavaDoc ondblclick)
135     {
136         _ondblclick = ondblclick;
137     }
138
139     public String JavaDoc getOndblclick()
140     {
141         if (_ondblclick != null) return _ondblclick;
142         ValueBinding vb = getValueBinding("ondblclick");
143         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
144     }
145
146     public void setOnkeydown(String JavaDoc onkeydown)
147     {
148         _onkeydown = onkeydown;
149     }
150
151     public String JavaDoc getOnkeydown()
152     {
153         if (_onkeydown != null) return _onkeydown;
154         ValueBinding vb = getValueBinding("onkeydown");
155         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
156     }
157
158     public void setOnkeypress(String JavaDoc onkeypress)
159     {
160         _onkeypress = onkeypress;
161     }
162
163     public String JavaDoc getOnkeypress()
164     {
165         if (_onkeypress != null) return _onkeypress;
166         ValueBinding vb = getValueBinding("onkeypress");
167         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
168     }
169
170     public void setOnkeyup(String JavaDoc onkeyup)
171     {
172         _onkeyup = onkeyup;
173     }
174
175     public String JavaDoc getOnkeyup()
176     {
177         if (_onkeyup != null) return _onkeyup;
178         ValueBinding vb = getValueBinding("onkeyup");
179         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
180     }
181
182     public void setOnmousedown(String JavaDoc onmousedown)
183     {
184         _onmousedown = onmousedown;
185     }
186
187     public String JavaDoc getOnmousedown()
188     {
189         if (_onmousedown != null) return _onmousedown;
190         ValueBinding vb = getValueBinding("onmousedown");
191         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
192     }
193
194     public void setOnmousemove(String JavaDoc onmousemove)
195     {
196         _onmousemove = onmousemove;
197     }
198
199     public String JavaDoc getOnmousemove()
200     {
201         if (_onmousemove != null) return _onmousemove;
202         ValueBinding vb = getValueBinding("onmousemove");
203         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
204     }
205
206     public void setOnmouseout(String JavaDoc onmouseout)
207     {
208         _onmouseout = onmouseout;
209     }
210
211     public String JavaDoc getOnmouseout()
212     {
213         if (_onmouseout != null) return _onmouseout;
214         ValueBinding vb = getValueBinding("onmouseout");
215         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
216     }
217
218     public void setOnmouseover(String JavaDoc onmouseover)
219     {
220         _onmouseover = onmouseover;
221     }
222
223     public String JavaDoc getOnmouseover()
224     {
225         if (_onmouseover != null) return _onmouseover;
226         ValueBinding vb = getValueBinding("onmouseover");
227         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
228     }
229
230     public void setOnmouseup(String JavaDoc onmouseup)
231     {
232         _onmouseup = onmouseup;
233     }
234
235     public String JavaDoc getOnmouseup()
236     {
237         if (_onmouseup != null) return _onmouseup;
238         ValueBinding vb = getValueBinding("onmouseup");
239         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
240     }
241
242     public void setOnreset(String JavaDoc onreset)
243     {
244         _onreset = onreset;
245     }
246
247     public String JavaDoc getOnreset()
248     {
249         if (_onreset != null) return _onreset;
250         ValueBinding vb = getValueBinding("onreset");
251         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
252     }
253
254     public void setOnsubmit(String JavaDoc onsubmit)
255     {
256         _onsubmit = onsubmit;
257     }
258
259     public String JavaDoc getOnsubmit()
260     {
261         if (_onsubmit != null) return _onsubmit;
262         ValueBinding vb = getValueBinding("onsubmit");
263         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
264     }
265
266     public void setStyle(String JavaDoc style)
267     {
268         _style = style;
269     }
270
271     public String JavaDoc getStyle()
272     {
273         if (_style != null) return _style;
274         ValueBinding vb = getValueBinding("style");
275         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
276     }
277
278     public void setStyleClass(String JavaDoc styleClass)
279     {
280         _styleClass = styleClass;
281     }
282
283     public String JavaDoc getStyleClass()
284     {
285         if (_styleClass != null) return _styleClass;
286         ValueBinding vb = getValueBinding("styleClass");
287         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
288     }
289
290     public void setTarget(String JavaDoc target)
291     {
292         _target = target;
293     }
294
295     public String JavaDoc getTarget()
296     {
297         if (_target != null) return _target;
298         ValueBinding vb = getValueBinding("target");
299         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
300     }
301
302     public void setTitle(String JavaDoc title)
303     {
304         _title = title;
305     }
306
307     public String JavaDoc getTitle()
308     {
309         if (_title != null) return _title;
310         ValueBinding vb = getValueBinding("title");
311         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
312     }
313
314
315     public Object JavaDoc saveState(FacesContext context)
316     {
317         Object JavaDoc values[] = new Object JavaDoc[22];
318         values[0] = super.saveState(context);
319         values[1] = _accept;
320         values[2] = _acceptcharset;
321         values[3] = _dir;
322         values[4] = _enctype;
323         values[5] = _lang;
324         values[6] = _onclick;
325         values[7] = _ondblclick;
326         values[8] = _onkeydown;
327         values[9] = _onkeypress;
328         values[10] = _onkeyup;
329         values[11] = _onmousedown;
330         values[12] = _onmousemove;
331         values[13] = _onmouseout;
332         values[14] = _onmouseover;
333         values[15] = _onmouseup;
334         values[16] = _onreset;
335         values[17] = _onsubmit;
336         values[18] = _style;
337         values[19] = _styleClass;
338         values[20] = _target;
339         values[21] = _title;
340         return ((Object JavaDoc) (values));
341     }
342
343     public void restoreState(FacesContext context, Object JavaDoc state)
344     {
345         Object JavaDoc values[] = (Object JavaDoc[])state;
346         super.restoreState(context, values[0]);
347         _accept = (String JavaDoc)values[1];
348         _acceptcharset = (String JavaDoc)values[2];
349         _dir = (String JavaDoc)values[3];
350         _enctype = (String JavaDoc)values[4];
351         _lang = (String JavaDoc)values[5];
352         _onclick = (String JavaDoc)values[6];
353         _ondblclick = (String JavaDoc)values[7];
354         _onkeydown = (String JavaDoc)values[8];
355         _onkeypress = (String JavaDoc)values[9];
356         _onkeyup = (String JavaDoc)values[10];
357         _onmousedown = (String JavaDoc)values[11];
358         _onmousemove = (String JavaDoc)values[12];
359         _onmouseout = (String JavaDoc)values[13];
360         _onmouseover = (String JavaDoc)values[14];
361         _onmouseup = (String JavaDoc)values[15];
362         _onreset = (String JavaDoc)values[16];
363         _onsubmit = (String JavaDoc)values[17];
364         _style = (String JavaDoc)values[18];
365         _styleClass = (String JavaDoc)values[19];
366         _target = (String JavaDoc)values[20];
367         _title = (String JavaDoc)values[21];
368     }
369     //------------------ GENERATED CODE END ---------------------------------------
370
}
371
Popular Tags