errorIndicatorElement = DOM.createDiv();
DOM.setElementProperty(errorIndicatorElement, "className",
"i-errorindicator");
- DOM.insertChild(getElement(), errorIndicatorElement, 0);
+ DOM.appendChild(getElement(), errorIndicatorElement);
}
if (errorMessage == null) {
errorMessage = new ErrorMessage();
if (icon == null) {
icon = new Icon(client);
- DOM.appendChild(getElement(), icon.getElement());
+ DOM.insertChild(getElement(), icon.getElement(), 0);
}
icon.setUri(uidl.getStringAttribute("icon"));
isEmpty = false;
if (uidl.hasAttribute("caption")) {
if (captionText == null) {
captionText = DOM.createSpan();
- DOM.appendChild(getElement(), captionText);
+ DOM
+ .insertChild(getElement(), captionText,
+ icon == null ? 0 : 1);
}
String c = uidl.getStringAttribute("caption");
if (c == null) {