Thanks for the tip Roberto, but I didn't succeed into adding the
app.properties (or just i can't get the key, i don't know)
And it feels strange to use the ValidationMessage for a standart message
Nick
Tapestry Infodea wrote:
I've forgetten a piece of code, you must contribute the
ValidationMessagesSource in your AppModule:
public void
contributeValidationMessagesSource(OrderedConfiguration<String>
configuration) {
configuration.add("myprop", "it/infodea/app/internal/myprop");
}
and define myprop.properties in it/infodea/app/internal/
Tapestry Infodea ha scritto:
You can use the ValidationMessagesSource and ThreadLocale services:
ValidationMessagesSource validationMessagesSource;
ThreadLocale threadLocale;
Messages messages =
validationMessagesSource.getValidationMessages(threadLocale.getLocale());
Roberto.
Nicolas Charles ha scritto:
Hello there,
I'm currently struggling with a proper way to use localization in a
service. My need is fairly simple : i'm using t5-restful-webservices
from Bill Holloway (by the way great job Bill) to offer REST services.
One of my service sends an email. The email is localized. Using the
Asset for the body of the mail works great for its localization.
However the mail's subject is stored in the app.properties...
I cannot use the @Inject Messages to retrieve the oh-so-convenient
Messages service ( Service id 'Messages' is not defined by any
module. )
Thus my question is :
- How can i access to the app.properties from a given service ?
The best of the best would be to have a possibility to use Messages,
but i'm open to any other solution
Regards,
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org