setHTML("");
// add preformatted text to dom
getElement().appendChild(preElement);
+ } else if ("uidl".equals(mode)) {
+ setHTML(uidl.getChildrenAsXML());
} else if ("xhtml".equals(mode)) {
setHTML(uidl.getChildUIDL(0).getChildUIDL(0).getChildString(0));
sinkOnloads = true;
*/
public static final int CONTENT_PREFORMATTED = 1;
+ /**
+ * Formatted content mode, where the contents is XML restricted to the UIDL
+ * 1.0 formatting markups.
+ *
+ * @deprecated Use CONTENT_XML instead.
+ */
+ @Deprecated
+ public static final int CONTENT_UIDL = 2;
+
/**
* Content mode, where the label contains XHTML. Contents is then enclosed
* in DIV elements having namespace of
}
if (contentMode == CONTENT_TEXT) {
target.addText(toString());
+ } else if (contentMode == CONTENT_UIDL) {
+ target.addUIDL(toString());
} else if (contentMode == CONTENT_XHTML) {
target.startTag("data");
target.addXMLSection("div", toString(),
String thisValue;
String otherValue;
- if (contentMode == CONTENT_XML || contentMode == CONTENT_XHTML) {
+ if (contentMode == CONTENT_XML || contentMode == CONTENT_UIDL
+ || contentMode == CONTENT_XHTML) {
thisValue = stripTags(toString());
} else {
thisValue = toString();
}
if (other instanceof Label
- && (((Label) other).getContentMode() == CONTENT_XML || ((Label) other)
+ && (((Label) other).getContentMode() == CONTENT_XML
+ || ((Label) other).getContentMode() == CONTENT_UIDL || ((Label) other)
.getContentMode() == CONTENT_XHTML)) {
otherValue = stripTags(other.toString());
} else {