As a side note: in 5.2 you CAN inject a Messages object at the service
layer ... this Messages object provides access to the application's
global message catalog (i.e., WEB-INF/app.properties). It's a proxy
Messages that internally determines the current Locale and delegates
to the correct localization of the global message catalog.

On Tue, Aug 30, 2011 at 3:10 AM, nillehammer
<tapestry.nilleham...@winfonet.eu> wrote:
>>> public Object doSomethingUseful(Object someParameter, Messages messages)
> {...}
> Yes, exactly
>
> In your page/component class:
> @Inject
> private Messages messages;
>
> @Inject
> MyService myService;
>
> private Object myValue;
>
> public final Object getValueFromService() {
>  return this.myService.doSomethingUseful(this.myObject, this.messages);
> }
>
> In your tml:
> <t:output t:value="valueFromService" ... />
> (I try to do method calls with parameters in the java code and avoid them in
> the tml, but that is a question of taste).
>
>
> -----
> http://www.winfonet.eu
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/component-scope-service-with-injected-messages-tp4724993p4749543.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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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

Reply via email to