AppFuseStrutsDates |
|
Your trail: |
Difference between
version 3
and
version 2:
At line 9 changed 1 line. |
to Strings in your form. |
between your POJO to your Form. |
At line 11 changed 2 lines. |
So in your form you have getDOB() which returns a string.... |
|
So in your form and your POJO, you have getDOB() which returns a date as well.... |
At line 22 changed 1 line. |
java.lang.String dob; - the bridge between the dob java.util.Date in your POJO and the form. |
java.util.Date dob; |
At line 26 changed 5 lines. |
The reason the dates are of type java.lang.String rather than java.util.Date in your |
form is that if you apply the struts datePattern dd/MM/yyy validator to the user input |
field, struts does not convert the string entered to a proper java.util.Date (that is |
my belief anyhow - please correct me if this is wrong).... struts only seems to be able |
to set the date property as a java.lang.String... |
Now, struts will not set a Date object on your form (even if you apply the datePatten dd/MM/yyyy). |
At line 27 added 10 lines. |
So you need three fields to capture the string input: |
|
{{{ |
private String dobString; |
private String hourDobString; |
private String minuteDobString; |
}}} |
|
Struts only seems to be able to set the date property as a java.lang.String... |
|
Back to AppFuseStrutsDates,
or to the Page History.
|