diff options
Diffstat (limited to 'src/com/itmill/toolkit/ui/AbstractComponent.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/AbstractComponent.java | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponent.java b/src/com/itmill/toolkit/ui/AbstractComponent.java index 8a1122c814..f4db9214ed 100644 --- a/src/com/itmill/toolkit/ui/AbstractComponent.java +++ b/src/com/itmill/toolkit/ui/AbstractComponent.java @@ -584,41 +584,39 @@ public abstract class AbstractComponent implements Component, MethodEventSource // Paint the contents of the component - if (getHeight() >= 0) { - target.addAttribute("height", "" + getHeight() - + UNIT_SYMBOLS[getHeightUnits()]); - } - if (getWidth() >= 0) { - target.addAttribute("width", "" + getWidth() - + UNIT_SYMBOLS[getWidthUnits()]); - } - - if (styles != null && styles.size() > 0) { - target.addAttribute("style", getStyle()); - } - if (isReadOnly()) { - target.addAttribute("readonly", true); - } - if (!isVisible()) { - target.addAttribute("invisible", true); - } - if (isImmediate()) { - target.addAttribute("immediate", true); - } - if (!isEnabled()) { - target.addAttribute("disabled", true); - } - if (getCaption() != null) { - target.addAttribute("caption", getCaption()); - } - if (getIcon() != null) { - target.addAttribute("icon", getIcon()); - } - // Only paint content of visible components. if (isVisible()) { - final String desc = getDescription(); - if (desc != null && description.length() > 0) { + + if (getHeight() >= 0) { + target.addAttribute("height", "" + getHeight() + + UNIT_SYMBOLS[getHeightUnits()]); + } + if (getWidth() >= 0) { + target.addAttribute("width", "" + getWidth() + + UNIT_SYMBOLS[getWidthUnits()]); + } + + if (styles != null && styles.size() > 0) { + target.addAttribute("style", getStyle()); + } + if (isReadOnly()) { + target.addAttribute("readonly", true); + } + + if (isImmediate()) { + target.addAttribute("immediate", true); + } + if (!isEnabled()) { + target.addAttribute("disabled", true); + } + if (getCaption() != null) { + target.addAttribute("caption", getCaption()); + } + if (getIcon() != null) { + target.addAttribute("icon", getIcon()); + } + + if (getDescription() != null && getDescription().length() > 0) { target.addAttribute("description", getDescription()); } @@ -628,6 +626,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource if (error != null) { error.paint(target); } + } else { + target.addAttribute("invisible", true); } } else { |