@Override protected void appendMainScriptTagContents(BootstrapContext context, StringBuilder builder) throws IOException { // fixed base theme to use - all portal pages with Vaadin // applications will load this exactly once String portalTheme = ((VaadinPortletRequest) context.getRequest()) .getPortalProperty(VaadinPortlet.PORTAL_PARAMETER_VAADIN_THEME); if (portalTheme != null && !portalTheme.equals(context.getThemeName())) { String portalThemeUri = getThemeUri(context, portalTheme); // XSS safe - originates from portal properties builder.append("vaadin.loadTheme('").append(portalThemeUri) .append("');"); } super.appendMainScriptTagContents(context, builder); }
String themeName = context.getThemeName(); if (themeName != null) { String themeUri = getThemeUri(context, themeName);
mainDiv.attr("id", context.getAppId()); mainDiv.addClass("v-app"); mainDiv.addClass(context.getThemeName()); mainDiv.addClass( context.getUIClass().getSimpleName().toLowerCase(Locale.ROOT));
String themeName = context.getThemeName(); if (themeName != null) { appConfig.put("theme", themeName);
@Override protected String getThemeUri() { return getVaadinDirUrl() + "themes/" + context.getThemeName(); }