[
https://issues.jboss.org/browse/SEAMINTL-43?page=com.atlassian.jira.plugi...
]
Ken Finnigan commented on SEAMINTL-43:
--------------------------------------
There's a bug in the documentation around altering the User Locale unfortunately.
Adding @Client to the injection point of the Event should solve the problem of the locale
not changing.
There would still be another problem though, in that the userLocale in UserSessionView is
injected as a dependent object. When the locale is changed, this dependent userLocale
will not be updated with the current locale after the alter event.
You may be able to get around that by doing:
@Inject
@Client
Instance<Locale> userLocale;
and then calling userLocale.get() to retrieve the contextual instance.
Alter user locale not working
-----------------------------
Key: SEAMINTL-43
URL:
https://issues.jboss.org/browse/SEAMINTL-43
Project: Seam International
Issue Type: Bug
Affects Versions: 3.0.0.Final
Environment: JBoss 6.0.0.Final, Seam 3.0.0.Final
Reporter: Esteve Aviles
Assignee: Ken Finnigan
Labels: international, seam
Original Estimate: 1 day
Remaining Estimate: 1 day
Hi,
I am trying to change locale properties settings without success.
I try to use it as described in the documentation:
public String changeLocale(){
log.info("Changing locale to: "+ new Locale(selectedLocale.get()));
localeEvent.fire(new Locale(selectedLocale.get()));
log.info("Locale Changed to: "+ userLocale);
messages.warn(new BundleKey("resources", "locale.changeok"), new
Locale(selectedLocale.get()));
return null;
}
An the result is something like this:
13:08:27,664 INFO [org.jboss.seam.international.examples.locale.UserSessionView]
Changing locale to: pt_br
13:08:27,664 INFO [org.jboss.seam.international.examples.locale.UserSessionView] Locale
Changed to: ca_ES
Resource boundle is not changed neither with the default nor with the changed one.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira