boolean isEmpty = true;
- if (uidl.hasAttribute("error")) {
- isEmpty = false;
- if (errorIndicatorElement == null) {
- errorIndicatorElement = DOM.createDiv();
- if (Util.isIE()) {
- DOM.setInnerHTML(errorIndicatorElement, " ");
- }
- DOM.setElementProperty(errorIndicatorElement, "className",
- "i-errorindicator");
- DOM.appendChild(getElement(), errorIndicatorElement);
- }
- } else if (errorIndicatorElement != null) {
- DOM.removeChild(getElement(), errorIndicatorElement);
- errorIndicatorElement = null;
- }
-
if (uidl.hasAttribute("icon")) {
if (icon == null) {
icon = new Icon(client);
}
if (uidl.getBooleanAttribute("required")) {
- isEmpty = false;
+ isEmpty = false;
if (requiredFieldIndicator == null) {
requiredFieldIndicator = DOM.createSpan();
DOM.setInnerText(requiredFieldIndicator, "*");
}
}
+ if (uidl.hasAttribute("error")) {
+ isEmpty = false;
+ if (errorIndicatorElement == null) {
+ errorIndicatorElement = DOM.createDiv();
+ if (Util.isIE()) {
+ DOM.setInnerHTML(errorIndicatorElement, " ");
+ }
+ DOM.setElementProperty(errorIndicatorElement, "className",
+ "i-errorindicator");
+ DOM.appendChild(getElement(), errorIndicatorElement);
+ }
+ } else if (errorIndicatorElement != null) {
+ DOM.removeChild(getElement(), errorIndicatorElement);
+ errorIndicatorElement = null;
+ }
+
// Workaround for IE weirdness, sometimes returns bad height in some
// circumstances when Caption is empty. See #1444
// IE7 bugs more often. I wonder what happens when IE8 arrives...