You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Milan Milanovic <mi...@yahoo.com> on 2008/05/19 17:57:15 UTC

[Struts 2] Datetimepicker tag Bug ?!

It seems that there is a bug with <datetimepicker> tag. I defined it as in documentation:
   
  <s:datetimepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd"  />
   
  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

       

Re: [Struts 2] Datetimepicker tag Bug ?!

Posted by Ralf Fischer <th...@googlemail.com>.
Hi,

as far as I understand the documentation [1], the <datetimepicker />
has no format attribute, so I wonder how your JSP gets compiled. Are
you looking for the displayFormat attribute?

The error from your first mail suggests an error either in the type
conversion or in general with the OGNL expression. Type conversion
concerning dates gets tricky, as the XWorkBasicConverter[2] expects
your date to be formatted in either the short, medium or long format
of the locale set for the request (either the browsers' locale or
hard-wired in struts.properties), or in rfc3339 [3] format. If your
date is not in one of these formats, the conversion obviously fails.

Cheers,
-Ralf

[1] http://struts.apache.org/2.x/docs/datetimepicker.html
[2] http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/util/XWorkBasicConverter.html
[3] http://www.ietf.org/rfc/rfc3339.txt


On Tue, May 20, 2008 at 5:23 PM, Milan Milanovic
<mi...@yahoo.com> wrote:
> I'm not sure if this is a problem. I switched my browser only to US
>  locale language and also in regional options and it is the same! I think
>  that is some conversion problem from jsp page to Date in version
>  2.0.11.1.
>
>  Regards, Milan
>
> Ian Meikle <im...@csc.com> wrote:  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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: What's the procedure to be taken off the strut email list ?

Posted by Jose Cardoso <Jo...@towerhamlets.gov.uk>.

Thanks 

jose 

-----Original Message-----
From: Musachy Barroso [mailto:musachy@gmail.com] 
Sent: 20 May 2008 16:31
To: Struts Users Mailing List
Subject: Re: What's the procedure to be taken off the strut email list ?

email "user-unsubscribe@struts.apache.org" and add "unsubscribe" to the subject, that should do.

musachy

On Tue, May 20, 2008 at 11:28 AM, Jose Cardoso <Jo...@towerhamlets.gov.uk> wrote:
>
> Hi All !
>
> What's the procedure to have my email removed from the struts mailing list ? I have already requested my email to be taken off the list but the administrators don't seem to be willing to do it .
>
> Jose
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@yahoo.com]
> Sent: 20 May 2008 16:23
> To: Struts Users Mailing List
> Subject: Re: [Struts 2] Datetimepicker tag Bug ?!
>
> I'm not sure if this is a problem. I switched my browser only to US  locale language and also in regional options and it is the same! I think  that is some conversion problem from jsp page to Date in version  2.0.11.1.
>
>  Regards, Milan
>
> Ian Meikle <im...@csc.com> wrote:  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
>
>
>
> **********************************************************************
> *********** Working Together for a Better Tower Hamlets Web site : 
> http://www.towerhamlets.gov.uk
>
> London Borough of Tower Hamlets E-Mail Disclaimer.
>
> This communication and any attachments are intended for the  addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed.
>
> If your request relates to a Freedom of Information enquiry, please 
> resend this to foi@towerhamlets.gov.uk
> **********************************************************************
> **************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: What's the procedure to be taken off the strut email list ?

Posted by Musachy Barroso <mu...@gmail.com>.
email "user-unsubscribe@struts.apache.org" and add "unsubscribe" to
the subject, that should do.

musachy

On Tue, May 20, 2008 at 11:28 AM, Jose Cardoso
<Jo...@towerhamlets.gov.uk> wrote:
>
> Hi All !
>
> What's the procedure to have my email removed from the struts mailing list ? I have already requested my email to be taken off the list but the administrators don't seem to be willing to do it .
>
> Jose
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@yahoo.com]
> Sent: 20 May 2008 16:23
> To: Struts Users Mailing List
> Subject: Re: [Struts 2] Datetimepicker tag Bug ?!
>
> I'm not sure if this is a problem. I switched my browser only to US  locale language and also in regional options and it is the same! I think  that is some conversion problem from jsp page to Date in version  2.0.11.1.
>
>  Regards, Milan
>
> Ian Meikle <im...@csc.com> wrote:  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
>
>
>
> *********************************************************************************
> Working Together for a Better Tower Hamlets
> Web site : http://www.towerhamlets.gov.uk
>
> London Borough of Tower Hamlets E-Mail Disclaimer.
>
> This communication and any attachments are intended for the  addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed.
>
> If your request relates to a Freedom of Information enquiry, please resend this to foi@towerhamlets.gov.uk
> ************************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


What's the procedure to be taken off the strut email list ?

Posted by Jose Cardoso <Jo...@towerhamlets.gov.uk>.
Hi All !

What's the procedure to have my email removed from the struts mailing list ? I have already requested my email to be taken off the list but the administrators don't seem to be willing to do it .

Jose  

-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@yahoo.com] 
Sent: 20 May 2008 16:23
To: Struts Users Mailing List
Subject: Re: [Struts 2] Datetimepicker tag Bug ?!

I'm not sure if this is a problem. I switched my browser only to US  locale language and also in regional options and it is the same! I think  that is some conversion problem from jsp page to Date in version  2.0.11.1.
   
  Regards, Milan

Ian Meikle <im...@csc.com> wrote:  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

       

*********************************************************************************
Working Together for a Better Tower Hamlets
Web site : http://www.towerhamlets.gov.uk

London Borough of Tower Hamlets E-Mail Disclaimer.

This communication and any attachments are intended for the  addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed. 

If your request relates to a Freedom of Information enquiry, please resend this to foi@towerhamlets.gov.uk
************************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Struts 2] Datetimepicker tag Bug ?!

Posted by Milan Milanovic <mi...@yahoo.com>.
I'm not sure if this is a problem. I switched my browser only to US
 locale language and also in regional options and it is the same! I think
 that is some conversion problem from jsp page to Date in version
 2.0.11.1.
   
  Regards, Milan

Ian Meikle <im...@csc.com> wrote:  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

       

Re: [Struts 2] Datetimepicker tag Bug ?!

Posted by Ian Meikle <im...@csc.com>.
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 <mi...@yahoo.com> 
19.05.2008 23:38
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>


To
Struts Users Mailing List <us...@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 <mi...@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





 

 

Re: [Struts 2] Datetimepicker tag Bug ?!

Posted by Milan Milanovic <mi...@yahoo.com>.
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 <mi...@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





       

       

Re: [Struts 2] Datetimepicker tag Bug ?!

Posted by Milan Milanovic <mi...@yahoo.com>.
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 <mi...@yahoo.com> 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





       

Re: [Struts 2] Datetimepicker tag Bug ?!

Posted by Milan Milanovic <mi...@yahoo.com>.
And when I add "value" attribute to this tag like this:
   
  <s:datetimepicker name="delivery.date" label="Delivery Date"
 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 <mi...@yahoo.com> 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