|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
<s:datetimepicker> 2Hi,
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. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
Re: <s:datetimepicker> 2-----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@... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFIIKeXaEMQXBIqssERApLfAJ9CjpbwSMoGqL2DqgjKP+bjvrfl9wCfYaqx JalJr0FeT3sQ5fSuQXqoNYE= =V+oP -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: <s:datetimepicker> 2Hi,
Thanks for the response. We are using S2 2.0.11.1 and in this version the "format" attribute does not exist in <s:datetimepicket> So you suggestion will not work for us. 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 <volker@...> 06.05.2008 20:46 Please respond to "Struts Users Mailing List" <user@...> To Struts Users Mailing List <user@...> cc Subject Re: <s:datetimepicker> 2 -----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@... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFIIKeXaEMQXBIqssERApLfAJ9CjpbwSMoGqL2DqgjKP+bjvrfl9wCfYaqx JalJr0FeT3sQ5fSuQXqoNYE= =V+oP -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free Forum Powered by Nabble | Forum Help |