Add TODOs related to UI development
[lgpl/argeo-commons.git] / swt / rap / org.argeo.cms.swt.rap / src / org / argeo / cms / web / CmsWebEntryPoint.java
index 216dc3654100b45f82ac2b5a07d33b558209916d..d0f4d41f83d5adf06ed14d80be51271ffc4efc77 100644 (file)
@@ -2,6 +2,8 @@ package org.argeo.cms.web;
 
 import static org.eclipse.rap.rwt.internal.service.ContextProvider.getApplicationContext;
 
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.security.PrivilegedAction;
 import java.util.Locale;
 import java.util.UUID;
@@ -241,6 +243,15 @@ public class CmsWebEntryPoint extends AbstractSwtCmsView implements EntryPoint,
                return cmsSession;
        }
 
+       @Override
+       public URI toBackendUri(String url) {
+               try {
+                       return new URI(url);
+               } catch (URISyntaxException e) {
+                       throw new IllegalArgumentException("Cannot convert " + url, e);
+               }
+       }
+
        /*
         * EntryPoint IMPLEMENTATION
         */
@@ -265,7 +276,9 @@ public class CmsWebEntryPoint extends AbstractSwtCmsView implements EntryPoint,
                                        Subject.doAs(loginContext.getSubject(), new PrivilegedAction<Void>() {
                                                @Override
                                                public Void run() {
+                                                       // TODO rather loop here, until there is an auth change
                                                        if (!display.readAndDispatch()) {
+                                                               // TODO update UI last access here
                                                                display.sleep();
                                                        }
                                                        return null;
@@ -291,6 +304,8 @@ public class CmsWebEntryPoint extends AbstractSwtCmsView implements EntryPoint,
                                        continue eventLoop;
                                }
                        }
+                       if (serverPushSession != null)
+                               serverPushSession.stop();
                        if (!display.isDisposed())
                                display.dispose();
                }