Thanks for all the replies everyone. This is good, but it'd be better if the prefix could be passed in from the template. I guess it would need another property & setter. I'm still a novice with Tapestry, but I can't think of a way of doing this without creating a component and having it take a parameter. It's not possible to do ${messagePrefix('product-name')} and have it call setMessagePrefix('product-name') or anything is it?
Thanks, Andy. Imants Firsts wrote: > > 2) Use your property like this in the template > ${prop:myMessage}, and in code define it as follows: > @Inject > private Messages _messages; > public String getMyMessage() { > return _messages.get("product-name-" + > getProductVariant()); > } > > 3) _messages.format("product-name", param1, param2); > > -- View this message in context: http://www.nabble.com/T5%3A-Expansions---prefixes-tp16448078p16467345.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]