Permalink
Browse files

Themes: bugfix.

  • Loading branch information...
1 parent 5bb0743 commit 60a264bc772afa05fcd5c6ff377aecdfaed4ede7 @semanticsoft committed Jan 9, 2013
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Vaaclipse
Bundle-SymbolicName: org.semanticsoft.vaaclipse.app;singleton:=true
-Bundle-Version: 1.0.0.M1
+Bundle-Version: 1.0.0.M2
Bundle-Activator: org.semanticsoft.vaaclipse.app.Activator
Bundle-Vendor: Rushan R. Gilmullin
Require-Bundle: org.eclipse.core.runtime,
@@ -16,6 +16,8 @@
import java.util.Map;
import java.util.UUID;
+import javax.servlet.http.HttpSession;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.RegistryFactory;
@@ -62,6 +64,7 @@
import org.semanticsoft.vaaclipse.publicapi.theme.ThemeManager;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.server.WebApplicationContext;
import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
@@ -149,7 +152,8 @@ public void handleEvent(Event event)
Theme theme = (Theme) event.getProperty(IEventBroker.DATA);
if (theme != null)
{
- VaadinE4Application.getInstance().setCssTheme(theme.getId());
+ HttpSession session = ((WebApplicationContext) getContext()).getHttpSession();
+ session.setAttribute(ThemeConstants.Attrubutes.themeid, theme.getId());
setThemeInternal(theme.getWebId());
}
}
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Publicapi
Bundle-SymbolicName: org.semanticsoft.vaaclipse.publicapi
-Bundle-Version: 1.0.0.M1
+Bundle-Version: 1.0.0.M2
Bundle-Vendor: Rushan R. Gilmullin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.semanticsoft.vaaclipse.publicapi.authentication,
@@ -12,4 +12,8 @@
public static class Events {
public static final String setThemeEvent = "SetThemeEvent";
}
+
+ public static class Attrubutes {
+ public static final String themeid = "org.semanticsoft.vaaclipse.themeid";
+ }
}
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Service-Component: OSGI-INF/org.vaadin.osgi.staticres.StaticResources.
xml
Private-Package: org.vaadin.osgi.staticres
-Bundle-Version: 1.0.0.M1
+Bundle-Version: 1.0.0.M2
Tool: Bnd-0.0.401
Bnd-LastModified: 1280258096925
Bundle-Name: org.semanticsoft.vaadin.osgi.staticres
@@ -34,6 +34,7 @@
import org.osgi.service.http.HttpService;
import org.semanticsoft.vaaclipse.api.ResourceInfoProvider;
import org.semanticsoft.vaaclipse.publicapi.theme.Theme;
+import org.semanticsoft.vaaclipse.publicapi.theme.ThemeConstants;
import org.semanticsoft.vaaclipse.publicapi.theme.ThemeContribution;
import org.semanticsoft.vaaclipse.publicapi.theme.ThemeEngine;
import org.semanticsoft.vaaclipse.util.Utils;
@@ -113,7 +114,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
String resourcePath = alias + path;
- String themeId = resourceInfoProvider.getCssTheme();
+ String themeId = (String) req.getSession().getAttribute(ThemeConstants.Attrubutes.themeid);
InputStream in = getInputStream(resourcePath,
themeEngine.getTheme(themeId),
resourceInfoProvider.getApplicationtWidgetset(),

0 comments on commit 60a264b

Please sign in to comment.