On Wed, Apr 2, 2008 at 11:43 AM, 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)
http://tapestry.apache.org/tapestry5/tapestry-core/guide/parameters.html
>
> 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}}
This is something you would delegate to code. You can inject a
Messages object: that's your component's message catalog (including
message keys inherited from the global application catalog).
>
> 3) Also how can you pass arguments to the messages to replace {0}, {1} etc?
It's based on String.format() not MessageFormat, so its %s and %d, not {0}, 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]
>
>
--
Howard M. Lewis Ship
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]