diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-11-29 07:07:45 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-11-29 07:07:45 +0000 |
commit | 38b6fa91ebcb6ba5fde4ef34a7d9bdfe539973b3 (patch) | |
tree | 6dd115472a060632d715983b6401c25d571f2129 /src/com/itmill | |
parent | 86b827c030f5243375e96eb6ad0be513e1a216a2 (diff) | |
download | vaadin-framework-38b6fa91ebcb6ba5fde4ef34a7d9bdfe539973b3.tar.gz vaadin-framework-38b6fa91ebcb6ba5fde4ef34a7d9bdfe539973b3.zip |
Button fixes (icon, description, error toggling)
svn changeset:3028/svn branch:trunk
Diffstat (limited to 'src/com/itmill')
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java index ce230247e6..74b211bb0b 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java @@ -79,7 +79,8 @@ public class IButton extends Button implements Paintable { errorMessage.updateFromUIDL(errorUidl); } else if (errorIndicatorElement != null) { - DOM.setStyleAttribute(errorIndicatorElement, "display", "none"); + DOM.removeChild(getElement(), errorIndicatorElement); + errorIndicatorElement = null; } if (uidl.hasAttribute("icon")) { @@ -88,11 +89,18 @@ public class IButton extends Button implements Paintable { DOM.insertChild(getElement(), icon.getElement(), 0); } icon.setUri(uidl.getStringAttribute("icon")); + } else { + if (icon != null) { + DOM.removeChild(getElement(), icon.getElement()); + icon = null; + } } // handle description if (uidl.hasAttribute("description")) { setTitle(uidl.getStringAttribute("description")); + } else { + setTitle(null); } } |