I believe Jesse did considerable work to OGNL (to speed it up, using
bytecode manipulation) between the two releases.

The conflict between two overloadings of getMessage() is a problem.
OGNL simply doesn't have syntax to let you select which of the two you
want to invoke, and it looks like its invoking the "wrong" one.

I would change the name of the new method, say to "retrieveMessage()"
or "resolveMessage()".

On Mon, Apr 27, 2009 at 9:03 AM,  <howard.kel...@algorithmics.com> wrote:
> Hi
>
> I’m trying to upgrade from tapestry 4.0.2 to 4.1.6 and am seeing some strange 
> behaviour.
>
> Basically we have our own implementation of org.apache.hivemind.Messages 
> which extends org.apache.hivemind.impl.AbstractMessages now in our 
> implementation we have a method called 
> getMessage(org.springframework.context.MessageSourceResolvable key) and in 
> our tapestry pages we’re using 
> ognl:messages.getMessage(request.getAttribute(‘message’)) which worked fine 
> in 4.0.2 because ognl called the 
> .apache.hivemind.impl.AbstractMessages.getMessage(String key) which is what 
> we want but in 4.1.6 it’s trying to convert the String 
> ‘welcome.problem.session.expired’ into 
> org.springframework.context.MessageSourceResolvable. I guess because it’s 
> trying to call getMessage(org.springframework.context.MessageSourceResolvable 
> key) in our implementation.
>
> I also have the same problem with a component of ours that has a parameter 
> named key to which we pass in ‘literal:welcome.username’ and in the component 
> we call messages.getMessage(key) which results in the same error. ‘Unable to 
> read OGNL expression: Unable to convert type java.lang.String of 
> welcome.username to type of 
> org.springframework.context.MessageSourceResolvable’. I’m a little confused 
> as to why it doesn’t call the correct method with the String parameter.
>
> However if I call messages.getMessage(‘welcome.username’) hard coding the 
> msgkey it works fine.
>
> Does that mean that in the new ognl/tapestry implementation we cannot pass a 
> component parameter/object(which is String) to an overloaded method?
>
> Any advice on how to rectify this would be greatly appreciated.
>
> Regards
>
> Howard Kelsey
>
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary 
> to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received 
> in error, use is prohibited. Please destroy, and notify sender. Sender does 
> not waive confidentiality or privilege. Internet communications cannot be 
> guaranteed to be timely, secure, error or virus-free. Algorithmics does not 
> accept liability for any errors or omissions. Any commitment intended to bind 
> Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to