private Element errorIndicatorElement;
+ private Element icon;
+
private Element captionText;
private ErrorMessage errorMessage;
DOM.setStyleAttribute(errorIndicatorElement, "display", "none");
}
+ if (uidl.hasAttribute("icon")) {
+ if (icon == null) {
+ icon = DOM.createImg();
+ DOM.appendChild(getElement(), icon);
+ }
+ DOM.setElementAttribute(icon, "src", uidl
+ .getStringAttribute("icon"));
+ } else {
+ if (icon != null)
+ DOM.removeChild(getElement(), icon);
+ }
+
if (uidl.hasAttribute("caption")) {
if (captionText == null) {
captionText = DOM.createSpan();
DOM.appendChild(getElement(), captionText);
}
DOM.setInnerText(captionText, uidl.getStringAttribute("caption"));
+ } else {
+ // TODO should span also be removed
}
if (uidl.hasAttribute("description")) {