This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts-examples.git
The following commit(s) were added to refs/heads/master by this push:
new 734491c Add prefilled age and save age in memory after form submit
new eb01155 Merge pull request #123 from frankwoodtiger/save-age-issue
734491c is described below
commit 734491c0038aedc5e6700b6d420a50b551379d19
Author: Chi Lee <[email protected]>
AuthorDate: Tue Dec 28 08:19:34 2021 -0500
Add prefilled age and save age in memory after form submit
---
.../main/java/org/apache/struts/edit/service/EditServiceInMemory.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/form-xml-validation/src/main/java/org/apache/struts/edit/service/EditServiceInMemory.java
b/form-xml-validation/src/main/java/org/apache/struts/edit/service/EditServiceInMemory.java
index 6bbf648..834ca84 100644
---
a/form-xml-validation/src/main/java/org/apache/struts/edit/service/EditServiceInMemory.java
+++
b/form-xml-validation/src/main/java/org/apache/struts/edit/service/EditServiceInMemory.java
@@ -25,6 +25,7 @@ public class EditServiceInMemory implements EditService {
person.setOver21(true);
person.setCarModels(carModels);
person.setPhoneNumber("123-456-9999");
+ person.setAge(new Integer(30));
}
@@ -43,6 +44,7 @@ public class EditServiceInMemory implements EditService {
EditServiceInMemory.person.setCarModels(personBean.getCarModels());
EditServiceInMemory.person.setEmail(personBean.getEmail());
EditServiceInMemory.person.setPhoneNumber(personBean.getPhoneNumber());
+ EditServiceInMemory.person.setAge(personBean.getAge());
}