struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Meikle <imei...@csc.com>
Subject Re: [Struts 2] Datetimepicker tag Bug ?!
Date Tue, 20 May 2008 05:33:25 GMT
I have had the same problem.
I assume you are not using an US locale in your client browser.
We use Norwegian and German and it does not work.

Regards
Ian

CSC Solutions Norge AS
Registered Office: SandsliƄsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------




Milan Milanovic <milanmilanovich@yahoo.com> 
19.05.2008 23:38
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
Struts Users Mailing List <user@struts.apache.org>
cc

Subject
Re: [Struts 2] Datetimepicker tag Bug ?!






I tried everything with <datetimepicker> tag!

It seems that Struts 2 in 2.0.11.1 version have a bug with type conversion 
from <s:datetimepicker> jsp tag (that is actually a String) to 
corresponding java.util.Date field in action class. Could someone confirm 
this ?

--
Thx, Milan

Milan Milanovic <milanmilanovich@yahoo.com> wrote: By using this 
name="delivery.date" attribute it reads the date good, but it can't store 
it back! It generates this error below 'ParametersInterceptor' ?
 
  --
  Thx, Milan

Milan Milanovic  wrote:
  And when I add "value" attribute to this tag like this:

format="#yyyy-#MM-#dd" name="delivery.date" />

it generates and exception:

18:24:22,531 ERROR org.apache.struts2.components.DateTimePicker:316 - 
Could not parse date
java.text.ParseException: Unparseable date: "pregled.odPeriod"
at java.text.DateFormat.parse(Unknown Source)
at 
org.apache.struts2.components.DateTimePicker.format(DateTimePicker.java:309)
at 
org.apache.struts2.components.DateTimePicker.evaluateParams(DateTimePicker.java:202)
at org.apache.struts2.components.UIBean.end(UIBean.java:481)
at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
...


Milan Milanovic wrote:
It seems that there is a bug with tag. I defined it as in documentation:



I have delivery object in my action class with date field (of type 
java.util.Date) and all necessary get/set methods. But when I submit the 
form I get this error:

17:55:47,968 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught 
setting 'delivery.date' on 'class com.myProject.actions.MyTestAction: 
Error setting expression 'delivery.date' with value 
'[Ljava.lang.String;@3b678'

It seems that Struts 2 always send String for any type of tag and that it 
cannot set Date ?

--
Thx in advance, Milan





 

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message