KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > taglib > SimpleFormBeanForTesting


1 /*
2  * $Id: SimpleFormBeanForTesting.java 54929 2004-10-16 16:38:42Z germuska $
3  *
4  * Copyright 1999-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19
20 package org.apache.struts.taglib;
21
22
23 import javax.servlet.http.HttpServletRequest JavaDoc;
24
25 import org.apache.struts.action.ActionMapping;
26 import org.apache.struts.validator.ValidatorForm;
27
28
29 /**
30  * Simple Form bean for the Cactus test cases.
31  * Feel free to add whatever you need to help with testing.
32  *
33  * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
34  */

35
36 public final class SimpleFormBeanForTesting extends ValidatorForm {
37
38
39     private String JavaDoc field1 = null;
40     private String JavaDoc field2 = null;
41
42     // --------------------------------------------------------- Public Methods
43

44
45     /**
46      * Reset all properties to their default values.
47      *
48      * @param mapping The mapping used to select this instance
49      * @param request The servlet request we are processing
50      */

51     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
52
53         this.field1 = null;
54         this.field2 = null;
55
56     }
57
58
59
60     /**
61      * Returns the field1.
62      * @return String
63      */

64     public String JavaDoc getField1() {
65         return field1;
66     }
67
68     /**
69      * Returns the field2.
70      * @return String
71      */

72     public String JavaDoc getField2() {
73         return field2;
74     }
75
76     /**
77      * Sets the field1.
78      * @param field1 The field1 to set
79      */

80     public void setField1(String JavaDoc field1) {
81         this.field1 = field1;
82     }
83
84     /**
85      * Sets the field2.
86      * @param field2 The field2 to set
87      */

88     public void setField2(String JavaDoc field2) {
89         this.field2 = field2;
90     }
91
92 }
93
Popular Tags