This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Comment

If I had two tables displaying the data from a bean in different ways I'd just write two instances of a table model that defines what's displayed. Nothing to do with i18n.

If you do need i18n messages within a table then you can use the message services provides by Spring rich. These are the getMessage methods on the Application.services() static method, and various other view, command etc classes.

Comment

I think that makes it clearer. It seems to be that you're trying to do something the bean table model wasn't designed to do. It assumes you always want to label a property by the same name and uses the bean property name as the key into the messages. You want to use message keys other than the property name, correct?

I'd either just write my own table models (they aren't hard after all) or override the createColumnNames method to do what you want to do.

Jonny

Comment

Comment

Another option is to use GlazedTableModel. It allows you to configure the model Id used to generate the message keys. This would allow you to use a different model id for the two different tables and the message keys would then be unique.