Details
Description
Hi.
I recently ran into problem with usage StringResourceModel class in
my application logic.
I need to grab value from StringResourceModel. And that value must be message for diferent locale than stored in session or inserted in component.
example:
lets have
s= new StringResourceModel(key, component, model, args);
session locale : en
component locale : en_UK
I need message for : sk_SK
i need something like
s= new StringResourceModel(key, component, model, args);
s.setLocale(/sk_SK/);
I propose
Introduce property "locale" . internally will have top priority in load() function, if is not set, it will pass next rule, witch is component and session.
if (customLocale != null)
{
locale= cusomLocale;
}
else
{
if (component != null)
else
{ locale = Session.exists() ? Session.get().getLocale() : Locale.getDefault(); }}
Thank for consideration.
Attachments
Issue Links
- Blocked
-
WICKET-6898 StringResourceModel does not respect getLocale for messages
- Open