1) I'm not sure if there is a list anywhere, but I know there are more
prefixes than those ;> 'var' is one!

2/3) You most likely want to do something like this:
XX.properties:
product-name = Apple Sauce - %s

Then when you want to use it, you will need to add a property to your
page/component:

@Inject
private Messages _messages;

public String getProductNameWithVariant()
{
return _messages.format("product-name", getProductVariant());
}

Then refer to it as ${productNameWithVariant} in your template.

Or, you may be interested in using a binding from the t5components package:
http://213.160.23.119:8080/t5components/t5c-commons/howto_messageformatbinding.html

On Wed, Apr 2, 2008 at 2:43 PM, Andy Blower <[EMAIL PROTECTED]>
wrote:

>
> I'm accessing message catalogs using expansion with a prefix. e.g.
> ${message:this-is-my-key}
>
> 1) Is there a list of prefixes anywhere, or have I got them all now?
> (literal, prop, message)
>
> 2) Is there a way of accessing a message with a key that's partially
> generated by another expansion?
> e.g. (this doesn't work obviously, but getProductVariant() is implemented
> in
> the page class and its output forms the last segment of the message key)
> ${message:product-name-${productVariant}}
>
> 3) Also how can you pass arguments to the messages to replace {0}, {1}
> etc?
>
> Thanks,
>
> Andy.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Expansions---prefixes-tp16448078p16448078.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]
>
>

Reply via email to