private static final String ERROR_NO_WINDOW_FOUND = "Application did not give any window, did you remember to setMainWindow()?";
- private static final String DEFAULT_THEME = "reindeer";
+ private static final String DEFAULT_THEME_NAME = "reindeer";
private String resourcePath = null;
*
* @return
*/
- String getDefaultTheme() {
- return DEFAULT_THEME;
+ public static String getDefaultTheme() {
+ return DEFAULT_THEME_NAME;
}
/**
themeName = request.getParameter("theme");
}
if (themeName == null) {
- themeName = applicationServlet.getDefaultTheme();
+ themeName = AbstractApplicationServlet.getDefaultTheme();
}
// TODO We should only precache the layouts that are not
import com.vaadin.terminal.DownloadStream;
import com.vaadin.terminal.ParameterHandler;
import com.vaadin.terminal.URIHandler;
+import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;
/**
* LoginForm is a Toolkit component to handle common problem among Ajax
*/
protected byte[] getLoginHTML() {
+ String defaultThemeName = AbstractApplicationServlet.getDefaultTheme();
+
String theme = getApplication().getMainWindow().getTheme();
String guessedThemeUri = getApplication().getURL() + "VAADIN/themes/"
- + (theme == null ? "default" : theme) + "/styles.css";
+ + (theme == null ? defaultThemeName : theme) + "/styles.css";
String guessedThemeUri2 = getApplication().getURL()
- + "../VAADIN/themes/" + (theme == null ? "default" : theme)
- + "/styles.css";
+ + "../VAADIN/themes/"
+ + (theme == null ? defaultThemeName : theme) + "/styles.css";
String appUri = getApplication().getURL().toString();