From ff87ad1b5b1952b40948f71c0a01cadd8c143932 Mon Sep 17 00:00:00 2001 From: Jani Laakso Date: Fri, 23 Nov 2007 08:31:20 +0000 Subject: [PATCH] Default theme URI is now null and not "default". Better documentation (error message) for developers regarding using new themes. svn changeset:2900/svn branch:trunk --- .../gwt/server/ApplicationServlet.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java index dbe34baf57..e59907a70f 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java @@ -444,7 +444,8 @@ public class ApplicationServlet extends HttpServlet { System.err .println("Requested resource [" + filename - + "] not found from filesystem or through class loader."); + + "] not found from filesystem or through class loader." + + " Add widgetset and/or theme JAR to your classpath or add files to WebContent/ITMILL folder."); response.setStatus(404); return; } @@ -514,23 +515,26 @@ public class ApplicationServlet extends HttpServlet { widgetset = DEFAULT_WIDGETSET; } - if (themeName == null) { - themeName = "default"; - } - String contextPath = request.getContextPath(); - String themeUri = contextPath + "/" + THEME_DIRECTORY_PATH + themeName; - + // Default theme does not use theme URI + String themeUri = null; + if (themeName != null) { + // Using custom theme + themeUri = contextPath + "/" + THEME_DIRECTORY_PATH + themeName; + } page.write("', pathInfo: '" + pathInfo + "', themeUri: '" + themeUri + "'\n};\n" + "\n" + "\n"); - if (!themeName.equals("default")) { + + if (themeName != null) { + // Custom theme's stylesheet page.write("\n"); } + page .write("\n\n" + " \n" @@ -1018,9 +1022,9 @@ public class ApplicationServlet extends HttpServlet { */ public class URIHandlerErrorImpl implements URIHandler.ErrorEvent { - private URIHandler owner; + private final URIHandler owner; - private Throwable throwable; + private final Throwable throwable; /** * -- 2.39.5