Object responseData = this.getResponseData();
if (responseData != null) {
startExtensionElementIfNecessary(writer, attributes, writingState);
writer.startElement(DATA_ELEMENT_NAME, component);
AjaxDataSerializer serializer = ServiceTracker.getService(context, AjaxDataSerializer.class);
writer.writeText(serializer.asString(responseData), null);
writer.endElement(DATA_ELEMENT_NAME);
}
Map<String, Object> responseComponentDataMap = this.getResponseComponentDataMap();
if (responseComponentDataMap != null && !responseComponentDataMap.isEmpty()) {
startExtensionElementIfNecessary(writer, attributes, writingState);
writer.startElement(COMPONENT_DATA_ELEMENT_NAME, component);
AjaxDataSerializer serializer = ServiceTracker.getService(context, AjaxDataSerializer.class);
writer.writeText(serializer.asString(responseComponentDataMap), null);
writer.endElement(COMPONENT_DATA_ELEMENT_NAME);
}
endExtensionElementIfNecessary(writer, writingState);