myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: convertDateTime caching (bug?)
Date Fri, 03 Oct 2008 12:11:35 GMT
In Trinidad, we pass the actual ValueBinding / ValueExpression to the
converter instance,
on getTimeZone(), for instance, we actually all
"valueBinding.getValue(context)", to get the
value.

The standard does the resolving on the tag class:
http://svn.apache.org/repos/asf/myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/taglib/core/ConvertDateTimeTag.java

So, that's why you see the effect.
Worth to include Trinidad ;-)

On Fri, Oct 3, 2008 at 2:44 AM, Sam Witty <samkwitty@yahoo.com> wrote:
>
> It seems that f:convertDateTime is caching the various parameters such as
> timezone, pattern etc... In other words they are loaded the first time the
> page is created and never reloaded again even if they are specified as an EL
> expression.
>
> For example:
> <h:outputText value="#{backendBean.time}">
>  <f:convertDateTime timeZone="#{backendBean.timeZone}" pattern="MM/dd/yy
> HH:mm"/>
> </h:outputText>
>
> In the above the timeZone is read from the bean once (the first time the
> page is constructed) and never again even though the value the EL expression
> is pointing to does change.
>
> Is this a bug? Is there a workaround (short of writing your own converter in
> your own tag library)?
>
> Thanks
> -Sam
> --
> View this message in context: http://www.nabble.com/convertDateTime-caching-%28bug-%29-tp19790378p19790378.html
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Mime
View raw message