struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Karlmeier <vol...@magiccode.eu>
Subject Re: <s:datetimepicker> 2
Date Tue, 06 May 2008 18:46:48 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

i did it like that:
in package_??.properties (?? for the locale)

dateformat=dd.MM.yyyy

in my jsp:
<s:set name="dateformat" value="%{getTextd('dateformat'})" />
<s:datetimepicker format="%{dateformat}" ... />

Maybe it works for you

~  volker




Ian Meikle schrieb:
| Hi,
|
| In the doc for <s:datetimepicker> it says: "The value sent to the server
| is a locale-independent value, in a hidden
|  field as defined by the name attribute. The value will be formatted
| conforming to RFC3 339 (yyyy-MM-dd'T'HH:mm:ss) "
|
| From my debugging two values are sent to the server.
|         1) dojo.attributeName
|         2) attributename
|
| 1) is in the RFC format 2) is in the "typed in" format.
|
| This means that the "typed in" format is the one converted and set into my
| object after being procesed by XWorkBasicConverter.doConvertToDate
| For a pure date field this conversion code uses the request locale to
| convert the string into a date.
| However because the typed in string is not as per locale (see my previous
| post on <s:datetimepicker> this conversion fails).
| If I change the template for the picker and swap the params so that
| "attributeName" actually gets the value in RFC format, the
| conversion also fails because this format is not checked for pure date
| fields, only datetime fields.
|
| Can anyone shed some light on this ?
|
| 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.
| 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|


- --
- -------------------------------

Volker Karlmeier
Friedrich-Freye-Str. 61
45481 Mülheim/Ruhr

Tel. :  (+49) 208-7785675
Mobil:  (+49) 176-21056587
Mail :  Volker@magiccode.eu

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFIIKeXaEMQXBIqssERApLfAJ9CjpbwSMoGqL2DqgjKP+bjvrfl9wCfYaqx
JalJr0FeT3sQ5fSuQXqoNYE=
=V+oP
-----END PGP SIGNATURE-----


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


Mime
View raw message