Regarding this theme:
http://www.nabble.com/-Struts-2--Datetimepicker-tag-Bug--%21-td17322058.html
I must reply in this way, because when I give reply to the message above
struts mailing list returns that my e-mail is SPAM?!
No, the thing is very simple. I have <datetimepicker> in my jsp that is
connected to Date object in my action class, as it is shown in Struts
documentation, but I still got that error. No, I have set displayFormat
attribute like this: displayFormat="dd.MM.yyyy", and it read good from
my Date object in action class, but when I sumbit the form it
generates that ParametersException ERROR. It seems that Struts 2 doesn't know
how to convert String value from <datetimepicker> to Date field. I tried
everything! Even 3 different browsers, multiple locale settings, etc.
I now tried to do the same thing but with <s:textfield>, in this way, I
defined in package.properties:
format.date = {0,date,dd.MM.yyyy}
and then I my .jsp page:
<s:text name="format.date" id="model.date">
<s:param name="value" value="date" />
</s:text>
<s:textfield value="%{model.date}" name="date" label="Date" />
And it reads good my date (of type java.util.Date from action class) field,
but when I submit the form I got the same error:
ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
'date' on 'class com.myProject.test.MyAction: Error setting expression 'date'
with value '[Ljava.lang.String;@106121'
I have get/set methods for date, and everything else works fine. What is the
problem with Date conversion in this Struts 2.0.1.11 ?
--
Please help!