return;\r
}\r
\r
+ boolean legendEmpty = true;\r
if (uidl.hasAttribute("caption")) {\r
DOM.setInnerText(caption, uidl.getStringAttribute("caption"));\r
+ legendEmpty = false;\r
} else {\r
DOM.setInnerText(caption, "");\r
}\r
DOM.insertChild(legend, icon.getElement(), 0);\r
}\r
icon.setUri(uidl.getStringAttribute("icon"));\r
+ legendEmpty = false;\r
} else {\r
if (icon != null) {\r
DOM.removeChild(legend, icon.getElement());\r
}\r
}\r
+ if (legendEmpty) {\r
+ DOM.setStyleAttribute(legend, "display", "none");\r
+ } else {\r
+ DOM.setStyleAttribute(legend, "display", "");\r
+ }\r
\r
if (uidl.hasAttribute("error")) {\r
final UIDL errorUidl = uidl.getErrors();\r