diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-06-29 14:33:33 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-06-29 14:33:33 +0000 |
commit | 42af2df434d96a993e90a46e08bbaa883f5c3b3b (patch) | |
tree | 4da3b2235df5586976c50d97160325fb204fa89e | |
parent | 41080300b278f90ef72490919e1b7adf8a4ccd78 (diff) | |
download | vaadin-framework-42af2df434d96a993e90a46e08bbaa883f5c3b3b.tar.gz vaadin-framework-42af2df434d96a993e90a46e08bbaa883f5c3b3b.zip |
Fix for #3059 - Window's setStyleName, removeStyleName does not remove old styles on the client side.
svn changeset:8267/svn branch:6.0
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VView.java | 3 | ||||
-rw-r--r-- | src/com/vaadin/tests/components/window/WindowStyleNames.java | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index d23dbb39de..00ed1e935c 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -155,7 +155,8 @@ public class VView extends SimplePanel implements Container, theme = newTheme; } if (uidl.hasAttribute("style")) { - addStyleName(uidl.getStringAttribute("style")); + setStyleName(getStylePrimaryName() + " " + + uidl.getStringAttribute("style")); } if (uidl.hasAttribute("name")) { diff --git a/src/com/vaadin/tests/components/window/WindowStyleNames.java b/src/com/vaadin/tests/components/window/WindowStyleNames.java index f48b0a9c6e..3a36926b42 100644 --- a/src/com/vaadin/tests/components/window/WindowStyleNames.java +++ b/src/com/vaadin/tests/components/window/WindowStyleNames.java @@ -36,6 +36,14 @@ public class WindowStyleNames extends TestBase { })); + addComponent(new Button("Add 'foo' style", new ClickListener() { + + public void buttonClick(ClickEvent event) { + getMainWindow().addStyleName("foo"); + } + + })); + } protected void setWindowStyle(String string) { |