KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > interfaces > PersonNamesForm


1 package test.interfaces;
2
3 /**
4  * Generated by XDoclet/ejbdoclet/strutsform. This class can be further processed with XDoclet/webdoclet/strutsconfigxml and XDoclet/webdoclet/strutsvalidationxml.
5  *
6  * @struts.form name="person.Names"
7  */

8 public class PersonNamesForm
9     extends org.apache.struts.action.ActionForm
10     implements java.io.Serializable JavaDoc
11 {
12     protected java.lang.String JavaDoc name;
13     protected java.lang.String JavaDoc firstName;
14     protected java.lang.String JavaDoc computedField;
15
16     /** Default empty constructor. */
17     public PersonNamesForm() {}
18
19     /** Constructor that takes the data object as argument. */
20     public PersonNamesForm(test.interfaces.PersonData dataHolder)
21     {
22        this.setName(dataHolder.getName());
23        this.setFirstName(dataHolder.getFirstName());
24     }
25
26     public java.lang.String JavaDoc getName()
27     {
28         return this.name;
29     }
30
31    /**
32     * @struts.validator type="required"
33     */

34     public void setName( java.lang.String JavaDoc name )
35     {
36         this.name = name;
37     }
38
39     public java.lang.String JavaDoc getFirstName()
40     {
41         return this.firstName;
42     }
43
44    /**
45     */

46     public void setFirstName( java.lang.String JavaDoc firstName )
47     {
48         this.firstName = firstName;
49     }
50
51     public java.lang.String JavaDoc getComputedField()
52     {
53         return this.computedField;
54     }
55
56    /**
57     */

58     public void setComputedField( java.lang.String JavaDoc computedField )
59     {
60         this.computedField = computedField;
61     }
62
63     public test.interfaces.PersonData getData(test.interfaces.PersonData dataHolder)
64     {
65        test.interfaces.PersonData retData = new test.interfaces.PersonData(dataHolder);
66
67         retData.setName(this.getName());
68         retData.setFirstName(this.getFirstName());
69
70         return retData;
71     }
72
73     public test.interfaces.PersonData getData()
74     {
75        test.interfaces.PersonData retData = new test.interfaces.PersonData();
76
77         retData.setName(this.getName());
78         retData.setFirstName(this.getFirstName());
79
80         return retData;
81     }
82
83     public void setData(test.interfaces.PersonData dataHolder)
84     {
85         this.setName (dataHolder.getName());
86         this.setFirstName (dataHolder.getFirstName());
87     }
88
89 }
90
Popular Tags