1 package test.interfaces; 2 3 8 public class PersonNamesForm 9 extends org.apache.struts.action.ActionForm 10 implements java.io.Serializable 11 { 12 protected java.lang.String name; 13 protected java.lang.String firstName; 14 protected java.lang.String computedField; 15 16 17 public PersonNamesForm() {} 18 19 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 getName() 27 { 28 return this.name; 29 } 30 31 34 public void setName( java.lang.String name ) 35 { 36 this.name = name; 37 } 38 39 public java.lang.String getFirstName() 40 { 41 return this.firstName; 42 } 43 44 46 public void setFirstName( java.lang.String firstName ) 47 { 48 this.firstName = firstName; 49 } 50 51 public java.lang.String getComputedField() 52 { 53 return this.computedField; 54 } 55 56 58 public void setComputedField( java.lang.String 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 |