1) See the Binding Expressions section.
http://tapestry.apache.org/tapestry5/tapestry-core/guide/parameters.html
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);
Best Regards,
Imants
Quoting Andy Blower <[EMAIL PROTECTED]>:
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]