aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/AbstractComponent.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2007-08-21 10:25:52 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2007-08-21 10:25:52 +0000
commitb52df5f024b2a1ef0c5b7d7777e6efe14b83f9d5 (patch)
tree4a9d42d490d105a0c1b901861ab74b992aafe0a3 /src/com/itmill/toolkit/ui/AbstractComponent.java
parent16fa9c78f5758f8c46e380a389a2e3296666a46d (diff)
downloadvaadin-framework-b52df5f024b2a1ef0c5b7d7777e6efe14b83f9d5.tar.gz
vaadin-framework-b52df5f024b2a1ef0c5b7d7777e6efe14b83f9d5.zip
setting null or "" for style empties style list
svn changeset:2087/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/AbstractComponent.java')
-rw-r--r--src/com/itmill/toolkit/ui/AbstractComponent.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponent.java b/src/com/itmill/toolkit/ui/AbstractComponent.java
index d872b644c2..43662bb001 100644
--- a/src/com/itmill/toolkit/ui/AbstractComponent.java
+++ b/src/com/itmill/toolkit/ui/AbstractComponent.java
@@ -177,8 +177,10 @@ public abstract class AbstractComponent implements Component, MethodEventSource
* default documentation from implemented interface.
*/
public void setStyle(String style) {
- if(style == null)
+ if(style == null || "".equals(style)) {
+ styles = null;
return;
+ }
if(this.styles == null) {
styles = new ArrayList();
}
@@ -188,7 +190,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
}
public void addStyleName(String style) {
- if(style == null)
+ if(style == null || "".equals(style))
return;
if(this.styles == null) {
styles = new ArrayList();