You can put the labels in your application's global properties file.
See: http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html
In particular, note the section on the Application Message Catalog:

"Application Message Catalog

If the file WEB-INF/AppName.properties exists in the context, it will be used as an application-wide message catalog. The AppName is derived from the name of the filter inside the web.xml file. The search for the file is case sensitive. The properties file may be localized.

Individual pages and components can override the values defined in this message catalog."


Robert

On Apr 10, 2008, at 4/104:10 AM , Michael Gerzabek wrote:
Hi,

I love the new enum support for automagic selects. Thanks for that Howard!

I have shifted many constants to enums. The arising question is how to prepare Messages to those enums in most convenient way.

At the time I use one property file per Page. When I have an enum display a select on that Page I customize labels for the distinct enum values in that property file. Having the same enum on different Pages I ran into the usual copy'n paste practice.

Is there a way to customize labels for enums in only one file per locale so that those properties get read whenever the enum is used on a Page?

What are your best practices?

Regards,
Michael

---------------------------------------------------------------------
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]

Reply via email to