You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ricardo Ramírez (JIRA)" <de...@myfaces.apache.org> on 2007/05/13 23:25:15 UTC

[jira] Created: (TOMAHAWK-986) The SharedRenderer fails to get the Default Locale when a headerDateFormat is specified

The SharedRenderer fails to get the Default Locale when a headerDateFormat is specified
---------------------------------------------------------------------------------------

                 Key: TOMAHAWK-986
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-986
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Schedule
    Affects Versions: 1.1.5
            Reporter: Ricardo Ramírez
            Priority: Minor


When the t:schedule specifies the "headerDateFormat" attribute, the Shared Renderer doesn't use the default locale, instead, it only creates a new SimpleDateFormat. Patch provided:

AbstractScheduleRenderer.java

Change
======================================================================

	format = new SimpleDateFormat(pattern);

To
======================================================================

	if (context.getApplication().getDefaultLocale() != null)
	{
		format = new SimpleDateFormat(pattern, context
			.getApplication().getDefaultLocale());
	}
	else
	{
		format = new SimpleDateFormat(pattern);
	}

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


[jira] Updated: (TOMAHAWK-986) The SharedRenderer fails to get the Default Locale when a headerDateFormat is specified

Posted by "Ricardo Ramírez (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Ramírez updated TOMAHAWK-986:
-------------------------------------

    Status: Patch Available  (was: Open)

> The SharedRenderer fails to get the Default Locale when a headerDateFormat is specified
> ---------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-986
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-986
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Schedule
>    Affects Versions: 1.1.5
>            Reporter: Ricardo Ramírez
>            Priority: Minor
>
> When the t:schedule specifies the "headerDateFormat" attribute, the Shared Renderer doesn't use the default locale, instead, it only creates a new SimpleDateFormat. Patch provided:
> AbstractScheduleRenderer.java
> Change
> ======================================================================
> 	format = new SimpleDateFormat(pattern);
> To
> ======================================================================
> 	if (context.getApplication().getDefaultLocale() != null)
> 	{
> 		format = new SimpleDateFormat(pattern, context
> 			.getApplication().getDefaultLocale());
> 	}
> 	else
> 	{
> 		format = new SimpleDateFormat(pattern);
> 	}

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


[jira] Updated: (TOMAHAWK-986) The SharedRenderer fails to get the Default Locale when a headerDateFormat is specified

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cagatay Civici updated TOMAHAWK-986:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.6-SNAPSHOT
           Status: Resolved  (was: Patch Available)

Fixed by always considering the locale info when creating the header date string. Locale used here is the calculated locale for the current view other than just the default locale of the application.

> The SharedRenderer fails to get the Default Locale when a headerDateFormat is specified
> ---------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-986
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-986
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Schedule
>    Affects Versions: 1.1.5
>            Reporter: Ricardo Ramírez
>         Assigned To: Cagatay Civici
>            Priority: Minor
>             Fix For: 1.1.6-SNAPSHOT
>
>
> When the t:schedule specifies the "headerDateFormat" attribute, the Shared Renderer doesn't use the default locale, instead, it only creates a new SimpleDateFormat. Patch provided:
> AbstractScheduleRenderer.java
> Change
> ======================================================================
> 	format = new SimpleDateFormat(pattern);
> To
> ======================================================================
> 	if (context.getApplication().getDefaultLocale() != null)
> 	{
> 		format = new SimpleDateFormat(pattern, context
> 			.getApplication().getDefaultLocale());
> 	}
> 	else
> 	{
> 		format = new SimpleDateFormat(pattern);
> 	}

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