Extend CMS view.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / web / CmsWebApp.java
index 70d3917d48813edbb82b7a2365f98a0215890e25..03ac353df248ab5952daa0ad559747d477131532 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.rap.rwt.application.ApplicationConfiguration;
 import org.eclipse.rap.rwt.client.WebClient;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.EventAdmin;
 
 /** An RWT web app integrating with a {@link CmsApp}. */
 public class CmsWebApp implements ApplicationConfiguration, CmsAppListener {
@@ -23,6 +24,7 @@ public class CmsWebApp implements ApplicationConfiguration, CmsAppListener {
 
        private BundleContext bundleContext;
        private CmsApp cmsApp;
+       private EventAdmin eventAdmin;
 
        private ServiceRegistration<ApplicationConfiguration> rwtAppReg;
 
@@ -70,7 +72,9 @@ public class CmsWebApp implements ApplicationConfiguration, CmsAppListener {
 //                                     log.warn("Theme id " + themeId + " was specified but it was not found, using default RWT theme.");
                        }
                        application.addEntryPoint("/" + uiName, () -> {
-                               return new CmsWebEntryPoint(this, uiName);
+                               CmsWebEntryPoint entryPoint = new CmsWebEntryPoint(this, uiName);
+                               entryPoint.setEventAdmin(eventAdmin);
+                               return entryPoint;
                        }, properties);
                        if (log.isDebugEnabled())
                                log.info("Added web entry point /" + (contextName != null ? contextName : "") + "/" + uiName);
@@ -126,4 +130,8 @@ public class CmsWebApp implements ApplicationConfiguration, CmsAppListener {
                }
        }
 
+       public void setEventAdmin(EventAdmin eventAdmin) {
+               this.eventAdmin = eventAdmin;
+       }
+
 }