You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/08/31 01:39:03 UTC

[jira] Resolved: (WICKET-3025) DateTextField converter does not honor current locale

     [ https://issues.apache.org/jira/browse/WICKET-3025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3025.
-----------------------------------

         Assignee: Igor Vaynberg
    Fix Version/s: 1.4.11
                   1.5-M2
       Resolution: Fixed

> DateTextField converter does not honor current locale
> -----------------------------------------------------
>
>                 Key: WICKET-3025
>                 URL: https://issues.apache.org/jira/browse/WICKET-3025
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.10
>            Reporter: Daniel Stoch
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.4.11, 1.5-M2
>
>
> I think there is a small bug in
> org.apache.wicket.extensions.markup.html.form.DateTextField.
> A DateConverter is created in the constructor:
>                 converter = new DateConverter()
> 		{
> 			private static final long serialVersionUID = 1L;
> 			/**
> 			 * @see org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
> 			 */
> 			@Override
> 			public DateFormat getDateFormat(Locale locale)
> 			{
> 				return new SimpleDateFormat(DateTextField.this.datePattern);
> 			}
> 		};
> But I think getDateFormat(...) method should looks like:
> @Override
> public DateFormat getDateFormat(Locale locale)
> {
>         if (locale == null)
> 	{
> 		locale = Locale.getDefault();
> 	}
> 	return new SimpleDateFormat(DateTextField.this.datePattern. locale);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.