I migrated from struts2.1.6 to 2.1.8.1 and all of a sudden my date
fields don't get saved any more. Has anyone else faced this issue?
Please, help. I am using plain text field for date and using getter and
setter methods in the model class to format the date.
the form has
<s:textfield key="t1gen.vdat1s" required="true"
value="%{t1gen.vdat1}" size="10" maxlength="10" label="Date of Birth
(yyyy/mm/dd)"/>
Setter in the model class
public void setvdat1s(String vdat1s) {
this.vdat1s = vdat1s;
if (vdat1s != null) {
try {
this.vdat1 = Format.parseDate(vdat1s);
} catch (Exception e) {
e.printStackTrace();
}
}
}
vdat1s is a String ad vdat1 is Date.
Regards,
Parminder Lehal
-