myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: [Trinidad] MessageFactory.BindingFacesMessage resolves parameters only once
Date Fri, 18 May 2007 17:55:32 GMT
Yeah, looks like a good fix.  I doubt the optimization of caching
here is buying us much of anything.

-- Adam


On 5/17/07, Martin Koci <Martin.Koci@aura.cz> wrote:
>
> Hi,
>
> I probably found a problem  with BindingFacesMessage class. If calling
> getMessage() it resolves value binding only once and then cache it. I
> think values should be resolved every time as normal ValueBinding or
> ValueExpressing does - calling getValue(context) creates a new value
> every time; but BindingFacesMessage returns still same value (which can
> be pretty old and unactual).
>
> How did I find the problem:
>
> - in my converter I added logger - its logging converter message in
> place where it occurs
>
> - calling message.getSummary() resolves label of component to null,
> because loadBundle is not loaded in process validation phase
>
> - in message renderer: it call message.getSummary() too but it return
> message with cached, null label. But there - in render response  phase -
> label is null no more, because bundles loaded with f:loadBundle already
> exist!
>
>
> I fixed it locally with:
> private void _resolveBindings()
>     {
>       //if (_resolvedParameters == null)
>       //{
>         _resolvedParameters = _getProcessedBindings(null, _parameters);
>       //}
>     }
>
> What do you think?
>
>
> Regards,
>
> Martin Koci
>
>
>
>
>
>
>
>

Mime
View raw message