]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8163 Print an error message if vaadinBootstap.js cannot be loaded
authorLeif Åstrand <leif@vaadin.com>
Fri, 6 Jan 2012 09:33:08 +0000 (11:33 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 6 Jan 2012 09:33:08 +0000 (11:33 +0200)
src/com/vaadin/terminal/gwt/server/BootstrapHandler.java

index f3cd585b5a7daf356e3d79b3cf86158f6ceeaa72..84f87124d3cf0cae0ad755283f2d836945df9c37 100644 (file)
@@ -309,12 +309,17 @@ public abstract class BootstrapHandler implements RequestHandler {
                 + "style=\"position:absolute;width:0;height:0;border:0;overflow:"
                 + "hidden;\" src=\"javascript:false\"></iframe>");
 
+        String bootstrapLocation = staticFileLocation
+                + "/VAADIN/vaadinBootstrap.js";
         page.write("<script type=\"text/javascript\" src=\"");
-        page.write(staticFileLocation);
-        page.write("/VAADIN/vaadinBootstrap.js\"></script>\n");
+        page.write(bootstrapLocation);
+        page.write("\"></script>\n");
 
         page.write("<script type=\"text/javascript\">\n");
         page.write("//<![CDATA[\n");
+        page.write("if (!window.vaadin) alert("
+                + JSONObject.quote("Failed to load the bootstrap javascript: "
+                        + bootstrapLocation) + ");\n");
 
         writeMainScriptTagContents(context);
         page.write("//]]>\n</script>\n");