Add navigation notification to CMS View.
[lgpl/argeo-commons.git] / org.argeo.cms.ui.rap / src / org / argeo / cms / web / CmsWebEntryPoint.java
index 62786f5afa0e477a180db2547792514feda3df62..1566f4c45ed54cf543efc905958f7a7fedc81c89 100644 (file)
@@ -158,9 +158,12 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL
 
        @Override
        public void exception(final Throwable e) {
-               exception = e;
-               log.error("Unexpected exception in CMS", e);
-               doRefresh();
+               ui.getDisplay().syncExec(() -> {
+                       CmsFeedback.show("Unexpected exception in CMS", e);
+                       exception = e;
+//             log.error("Unexpected exception in CMS", e);
+                       doRefresh();
+               });
        }
 
        protected synchronized void doRefresh() {
@@ -228,6 +231,11 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL
                eventAdmin.sendEvent(new Event(topic, properties));
        }
 
+       @Override
+       public void stateChanged(String state, String title) {
+               browserNavigation.pushState(state, title);
+       }
+
        /*
         * EntryPoint IMPLEMENTATION
         */