I don't know that there's a built-in solution better than what you already have.

However, that Messages interface doesn't say its just for components.
I suspect you could build something similar to Tapestry's
ComponentMessagesSource service, but for entities.

You could then hook into the MasterObjectProvider to support something like:

@Inject @EntityMessages(Account.class)
private Messages accountMessages;

I'm looking to open up some of the internals of
ComponentMessagesSource, to make it easier to extend and override for
component messages, but the changes may make implementing
a solution like the one I just described easier, as well.

On Fri, Feb 5, 2010 at 12:23 PM, Jonhy Pear <[email protected]> wrote:
> Hello,
>
> We're using the Internationalization features from tapestry but we need to
> know if there's a better way to do what we're doing.
>
> We have message catalogs for the application and for each page, but we want
> to have a catalog related to an entity.
>
> For example, we have an entity (hibernate class) that represents a User.
> This entity, or part of it, is used across many pages and what we're doing
> is to have the messages related to User in app main catalog.
>
> We though that we can use a message catalog only with messages related to
> User and use that catalog across many pages.
>
> How can we accomplish this? Or there's a better way to do it?
>
> Thank you,
>
> JP
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to