Hi Angelo,

I don't think you can use Messages as a service dependency as Messages is based 
around a ResourceBundle, for which the lookup is usually provided by your 
page/component Class, kind of similar to ComponentResources in a way. Unless 
someone is aware of a workaround, you may be better off simply passing it in as 
an argument.

Kind regards
Peter

----- Original Message -----
From: "Angelo Chen" <angelochen...@yahoo.com.hk>
To: users@tapestry.apache.org
Sent: Friday, 31 July, 2009 05:04:22 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: t5: using Messages in a service


Hi,

I try use constructor injection to inject the Messages into my service, but
I always get a error that:
Caused by: java.lang.RuntimeException: No service implements the interface
org.apache.tapestry5.ioc.Messages.
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:560)
that looks like Messages can not be used in a service, but why it can be
injected from a page?
and how to access messages for localized messages ? Thanks,

Angelo
-- 
View this message in context: 
http://www.nabble.com/t5%3A-using-Messages-in-a-service-tp24750002p24750002.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


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

Reply via email to