Am 23.08.2011 14:23, schrieb Stephan Windmüller:

On the other hand, if you inject the global Messages object
(containing the contents of app.properties plus other things) that's
actually a dynamic proxy that delegates to the correct instance
matching the thread locale at the time you invoke methods.
Are you referring to org.apache.tapestry5.ioc.Messages? This values do
not change after altering the ThreadLocale.

I fixed it now with this code:

-----

@Inject
private ComponentModelSource componentModelSource;

@Inject
private ComponentMessagesSource componentMessagesSource;

[...]

void setupRender() {

    ComponentModel model = componentModelSource
        .getPageModel(this.getClass().getSimpleName());
    Messages englishMessages =
        componentMessagesSource.getMessages(model, Locale.ENGLISH);

}

-----

- Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to