Do not refresh by navigate notification.
[lgpl/argeo-commons.git] / org.argeo.cms.ui.rap / src / org / argeo / cms / web / CmsWebEntryPoint.java
index 62786f5afa0e477a180db2547792514feda3df62..9dae30cb26416807b2a49f5b60b54b630d27cf39 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() {
@@ -214,7 +217,7 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL
        @Override
        public void navigated(BrowserNavigationEvent event) {
                setState(event.getState());
-               doRefresh();
+               //doRefresh();
        }
 
        @Override
@@ -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
         */