]> source.dussan.org Git - vaadin-framework.git/commitdiff
Multiple entrypoints due to widgetset inheritance behaves better again; fixes #3974
authorMarc Englund <marc.englund@itmill.com>
Wed, 10 Feb 2010 20:14:53 +0000 (20:14 +0000)
committerMarc Englund <marc.englund@itmill.com>
Wed, 10 Feb 2010 20:14:53 +0000 (20:14 +0000)
svn changeset:11258/svn branch:6.2

src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
src/com/vaadin/terminal/gwt/client/DefaultWidgetSet.java

index 39f4e845f7b69ab5bcf990fac888bfe12e797814..060c4dedf1eae74f59df0107b2f8ddc22f213d60 100644 (file)
@@ -148,6 +148,7 @@ public class ApplicationConfiguration {
         int lastdot = module.lastIndexOf(".");
         String base = module.substring(0, lastdot);
         String simpleName = module.substring(lastdot + 1);
+        // TODO figure out (ask around) WTF this is almost-removed
         // if (!wsname.startsWith(base) || !wsname.endsWith(simpleName)) {
         // // WidgetSet module name does not match implementation name;
         // // probably inherited WidgetSet with entry-point. Skip.
@@ -161,7 +162,7 @@ public class ApplicationConfiguration {
             String msg = "Tried to init " + widgetset.getClass().getName()
                     + ", but " + initedWidgetSet.getClass().getName()
                     + " was already inited.";
-            ApplicationConnection.getConsole().log(msg);
+            throw new IllegalStateException(msg);
         }
         initedWidgetSet = widgetset;
         ArrayList<String> appIds = new ArrayList<String>();
index 919c267eb009968f44f9864131531088e4446298..feefdc74210473f25fa172d7ef48110c40c9c312 100644 (file)
@@ -37,7 +37,14 @@ public class DefaultWidgetSet implements WidgetSet {
      * This is the entry point method. It will start the first
      */
     public void onModuleLoad() {
-        ApplicationConfiguration.initConfigurations(this);
+        try {
+            ApplicationConfiguration.initConfigurations(this);
+        } catch (Exception e) {
+            // Log & don't continue;
+            // custom WidgetSets w/ entry points will cause this
+            ApplicationConnection.getConsole().log(e.getMessage());
+            return;
+        }
         ApplicationConfiguration.startNextApplication(); // start first app
         map = GWT.create(WidgetMap.class);
     }