You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by StrongSteve <sw...@gmail.com> on 2012/11/27 18:39:47 UTC

Override MessagesImpl

Hello,

Is it possible to override Tapestrys MessagesImpl?

What we are trying to achieve is to use placeholders inside the
message*.properties files.
So for example the global_message.properties contains an entry like "keyA =
valueA".
Inside a component property file we want to reuse this key in a way like
"keyB = {keyA}" or "keyC={keyA}".

Therefore we need to provide some specific logic for detecting a referenced
key "{keyA}" and for replacing it with the correct value.

Our first approach is to override String get(String key) inside
MessagesImpl.

If this is not possible any advice on how we could achieve this goal?

Thanks for your help!
Stefan



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Override-MessagesImpl-tp5718346.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Override MessagesImpl

Posted by Lance Java <la...@googlemail.com>.
You will either decorate or override the MessagesSource service. Take a look
at the MessagesSourceImpl source code for inspiration.

http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html
http://tapestry.apache.org/tapestry-ioc-decorators.html
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/internal/services/MessagesSource.html
http://tapestry.apache.org/current/apidocs/src-html/org/apache/tapestry5/internal/services/MessagesSourceImpl.html



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Override-MessagesImpl-tp5718346p5718352.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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