diff options
author | Artur Signell <artur@vaadin.com> | 2013-05-28 12:00:15 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-05-29 12:33:17 +0000 |
commit | a9afca67ba942afa287be3507eb225e0a7b954e6 (patch) | |
tree | d2ddd12b3acc2f83c3361c018717bd557454cec6 /server/src/com/vaadin/ui/AbstractComponent.java | |
parent | a3ad62d947c86d3f53f333ca9bc36e4544cd5d46 (diff) | |
download | vaadin-framework-a9afca67ba942afa287be3507eb225e0a7b954e6.tar.gz vaadin-framework-a9afca67ba942afa287be3507eb225e0a7b954e6.zip |
Moved Locale data handling to LocaleService (#11378)
The locale data is now tracked per UI instance and no longer sent in every request.
Change-Id: I4bebd00327da6f8d812181fd76a85eb6196d0010
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponent.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index 06060dbf91..9ff36a42d2 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -291,7 +291,10 @@ public abstract class AbstractComponent extends AbstractClientConnector public void setLocale(Locale locale) { this.locale = locale; - // FIXME: Reload value if there is a converter + if (locale != null && isAttached()) { + getUI().getLocaleService().addLocale(locale); + } + markAsDirty(); } @@ -556,6 +559,10 @@ public abstract class AbstractComponent extends AbstractClientConnector focus(); } setActionManagerViewer(); + if (locale != null) { + getUI().getLocaleService().addLocale(locale); + } + } /* |