Set CmsSession locale as RWT locale.
[lgpl/argeo-commons.git] / org.argeo.cms.ui.rap / src / org / argeo / cms / web / CmsWebEntryPoint.java
index 470aa5edc0ccc7630e9caee2ace4f73d274212e7..9a023d6bc780f999ee3afa281f46209be413ae7c 100644 (file)
@@ -103,6 +103,9 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL
                                try {
                                        uxContext = new SimpleUxContext();
                                        imageManager = new DefaultImageManager();
+                                       CmsSession cmsSession = getCmsSession();
+                                       if (cmsSession != null)
+                                               RWT.setLocale(cmsSession.getLocale());
                                        ui = cmsWebApp.getCmsApp().initUi(parent);
                                        ui.setData(CmsApp.UI_NAME_PROPERTY, uiName);
                                        ui.setLayoutData(CmsUiUtils.fillAll());
@@ -205,7 +208,8 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL
        public void navigateTo(String state) {
                exception = null;
                String title = setState(state);
-               doRefresh();
+               if (title != null)
+                       doRefresh();
                if (browserNavigation != null)
                        browserNavigation.pushState(state, title);
        }