data = getWidget().getSrc(uidl, client);
} else {
data = "data:image/svg+xml," + parameters.get("data");
}
getWidget().setHTML("");
ObjectElement obj = Document.get().createObjectElement();
obj.setType(mime);
obj.setData(data);
if (!isUndefinedWidth()) {
obj.getStyle().setProperty("width", "100%");
}
if (!isUndefinedHeight()) {
obj.getStyle().setProperty("height", "100%");
}
if (uidl.hasAttribute("classid")) {
obj.setAttribute("classid",
uidl.getStringAttribute("classid"));
}
if (uidl.hasAttribute("codebase")) {
obj.setAttribute("codebase",
uidl.getStringAttribute("codebase"));
}
if (uidl.hasAttribute("codetype")) {
obj.setAttribute("codetype",
uidl.getStringAttribute("codetype"));
}
if (uidl.hasAttribute("archive")) {
obj.setAttribute("archive",
uidl.getStringAttribute("archive"));
}
if (uidl.hasAttribute("standby")) {
obj.setAttribute("standby",
uidl.getStringAttribute("standby"));
}
getWidget().getElement().appendChild(obj);
if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
obj.setInnerText(uidl
.getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
}
} else {
VConsole.error("Unknown Embedded mimetype '" + mime + "'");
}