From: Artur Signell Date: Thu, 19 Nov 2009 14:12:20 +0000 (+0000) Subject: Fix for #3185 - Add possibility to specify application CSS class name X-Git-Tag: 6.7.0.beta1~2281 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a293d62873c7bb24db64759af847f40c3b5d3ee3;p=vaadin-framework.git Fix for #3185 - Add possibility to specify application CSS class name svn changeset:9924/svn branch:6.2 --- diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java index 692f30dc92..b2ef6f466f 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java @@ -1385,13 +1385,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet { * .v-theme- */ - String appClass = "v-app-"; - try { - appClass += getApplicationClass().getSimpleName(); - } catch (ClassNotFoundException e) { - appClass += "unknown"; - e.printStackTrace(); - } + String appClass = "v-app-" + getApplicationCSSClassName(); + String themeClass = ""; if (themeName != null) { themeClass = "v-theme-" + themeName.replaceAll("[^a-zA-Z0-9]", ""); @@ -1419,6 +1414,24 @@ public abstract class AbstractApplicationServlet extends HttpServlet { } + /** + * Returns the application class identifier for use in the application CSS + * class name in the root DIV. The application CSS class name is of form + * "v-app-"+getApplicationCSSClassName(). + * + * This method should normally not be overridden. + * + * @return The CSS class name to use in combination with "v-app-". + */ + protected String getApplicationCSSClassName() { + try { + return getApplicationClass().getSimpleName(); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + return "unknown"; + } + } + /** * Get the URI for the application theme. *