KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > examples > app2 > DemoForm


1 /*
2  * Copyright 2003-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
17 package examples.app2;
18
19
20 import javax.servlet.http.HttpServletRequest JavaDoc;
21 import org.apache.struts.action.ActionError;
22 import org.apache.struts.action.ActionErrors;
23 import org.apache.struts.action.ActionForm;
24 import org.apache.struts.action.ActionMapping;
25
26
27 /**
28  * <p>A simple form for demo purposes.</p>
29  *
30  * @author <a HREF="mailto:sidler@teamup.com"/>Gabe Sidler</a>
31  * @version $Id: DemoForm.java,v 1.2 2004/02/20 12:42:52 marino Exp $
32  */

33
34 public final class DemoForm extends ActionForm
35 {
36
37     // ---- Form fields -------------------------------------------------
38

39     private String JavaDoc language = "";
40
41
42     // ---- Accessor Methods --------------------------------------------
43

44     public String JavaDoc getLanguage()
45     {
46         return language;
47     }
48
49     public void setLanguage(String JavaDoc s)
50     {
51         language = s;
52     }
53
54
55
56
57     /**
58      * Reset all properties to their default values.
59      *
60      * @param mapping The mapping used to select this instance
61      * @param request The servlet request we are processing
62      */

63     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request)
64     {
65
66         language = "";
67
68     }
69
70 }
71
72
73
Popular Tags