Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.24.02, 2.25.01-alpha
-
None
Description
When a ParametersInfo class contains a method with return type java.util.Date, the template composer will render a date picker to select a date. Setting the date in the UI works fine, but retrieving the date in the HstComponent fails. The following exception is then logged:
[INFO] [talledLocalContainer] 27.01.2012 17:59:09 WARN [org.apache.commons.beanutils.converters.DateTimeConverter.toDate():465] DateConverter does not support default String to 'Date' conversion.
[INFO] [talledLocalContainer] 27.01.2012 17:59:09 WARN [org.apache.commons.beanutils.converters.DateTimeConverter.toDate():466] (N.B. Re-configure Converter or use alternative implementation)
Steps to reproduce:
1. create a project with archetype 1.05.02
2. add a method that return a date to the ListViewInfo class. For example:
@Parameter(name = "myDate", defaultValue = "5/5/2012", displayName = "My Date")
Date getMyDate();
3. in the ListView component retrieve the date value. For example:
ListViewInfo info = getParametersInfo(request);
System.out.println("Date=" + info.getMyDate());
4. login as admin into the CMS, open the template composer drag the 'list' component into the container on the home page.
Expected result: no warnings are logged
Actual result: many warnings are logged about DateTimeConverter.toDate()
Attachments
Issue Links
- relates to
-
CHANNELMGR-24 Component property of type date is stored in locale-specific date format
- Closed