http://jira.opensymphony.com/browse/OGNL

but it looks like it's inactive for some time now...  I'd say it's fastest
to rename getMessage(org.springframework.context.MessageSourceResolvable key)
in your base class

or write a simple binding prefix that has the request injected to it
and that simply returns:
component.getMessages().getMessage(getRequest().getAttribute( value ))

and in the html use:
<span jwcid="@Insert" value="msgCustom:message" />

On Fri, May 8, 2009 at 6:05 PM,  <howard.kel...@algorithmics.com> wrote:
> Hi
>
> I think this is a bug. I’ve had no response from you, should I just raise it
> as a bug?
>
> Any advice would be appreciated.
>
> Regards
>
> Howard
>
>
> ________________________________
> 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.
> ________________________________
>
> ---------- Forwarded message ----------
> From: <howard.kel...@algorithmics.com>
> To: <users@tapestry.apache.org>
> Date: Mon, 27 Apr 2009 17:03:36 +0100
> Subject: Tapestry upgrade
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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

Reply via email to