You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2009/05/16 01:14:45 UTC

[jira] Resolved: (MYFACES-2177) ConvertDateTimeTag timeZone does not work with ValueExpression of return type String

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

Leonardo Uribe resolved MYFACES-2177.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.7-SNAPSHOT
         Assignee: Leonardo Uribe

The code on ConvertDateTimeTag is right, the problem comes from tld generation. Really is an "exception" to the rule, so the best is change on the velocity template. Thanks for point this issue.

> ConvertDateTimeTag timeZone does not work with ValueExpression of return type String
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2177
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2177
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.6
>            Reporter: Philipp Schoepf
>            Assignee: Leonardo Uribe
>             Fix For: 1.2.7-SNAPSHOT
>
>
> A always get an exception like this when I bind a VE avaluating to a TimeZone pattern (GMT+1) to the timeZone property of the convertDateTime converter:
>  java.lang.IllegalArgumentException: Cannot convert GMT+1 of type class java.lang.String to class java.util.TimeZone
> This worked for MyFaces 1.1 and since we are currently migrating this breaks our code.
> I believe the root cause for this problem is the definition of the convertDateTimeTag in the myfaces tld, which will never allow VE with return types other than java.util.TimeZone to be bound:
> <attribute>
>          <description><![CDATA[The time zone to use instead of GMT (the default timezone). When
> this value is a value-binding to a TimeZone instance, that
> timezone is used. Otherwise this value is treated as a String
> containing a timezone id, ie as the ID parameter of method
> java.util.TimeZone.getTimeZone(String).]]></description>
>          <name>timeZone</name>
>          <deferred-value>
>              <type>java.util.TimeZone</type>
>          </deferred-value>
>       </attribute>

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