]> source.dussan.org Git - vaadin-framework.git/commitdiff
Reports error to console if themeUri==null and ThemeResource used
authorMarc Englund <marc.englund@itmill.com>
Fri, 30 Nov 2007 15:04:09 +0000 (15:04 +0000)
committerMarc Englund <marc.englund@itmill.com>
Fri, 30 Nov 2007 15:04:09 +0000 (15:04 +0000)
svn changeset:3086/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java

index 9e697a03cbd6cb0f893d82f3614e03f8c9b257dc..54f5885b37eff1fe25530431266ab8adc5d502da 100755 (executable)
@@ -570,8 +570,14 @@ public class ApplicationConnection {
      * @return translated URI ready for browser
      */
     public String translateToolkitUri(String toolkitUri) {
-        if (toolkitUri.startsWith("theme")) {
-            toolkitUri = getThemeUri() + toolkitUri.substring(7);
+        if (toolkitUri.startsWith("theme://")) {
+            String themeUri = getThemeUri();
+            if (themeUri == null) {
+                console
+                        .error("Theme not set: ThemeResource will not be found. ("
+                                + toolkitUri + ")");
+            }
+            toolkitUri = themeUri + toolkitUri.substring(7);
         }
         return toolkitUri;
     }