else {
externalContext.addResponseHeader("Content-Type", "text/xml; charset=" + externalContext.getResponseCharacterEncoding());
externalContext.addResponseHeader("Cache-Control", "no-cache");
externalContext.setResponseContentType("text/xml");
PartialResponseWriter writer = context.getPartialViewContext().getPartialResponseWriter();
writer.startDocument();
writer.startElement("changes", null);
if (!ComponentUtils.isValueBlank(handlerComponent.getUpdate())) {
List<UIComponent> updates = SearchExpressionFacade.resolveComponents(context, handlerComponent, handlerComponent.getUpdate());
if (updates != null && updates.size() > 0) {
context.setResponseWriter(writer);
for (int i = 0; i < updates.size(); i++) {
UIComponent component = updates.get(i);
writer.startElement("update", null);
writer.writeAttribute("id", component.getClientId(context), null);
writer.startCDATA();
component.encodeAll(context);
writer.endCDATA();
writer.endElement("update");
}
}
}
if (!ComponentUtils.isValueBlank(handlerComponent.getOnexception())) {
writer.startElement("eval", null);
writer.startCDATA();
writer.write("var hf=function(type,message,timestampp){");
writer.write(handlerComponent.getOnexception());
writer.write("};hf.call(this,\"" + info.getType() + "\",\"" + ComponentUtils.escapeText(info.getMessage()) + "\",\"" + info.getFormattedTimestamp() + "\");");
writer.endCDATA();
writer.endElement("eval");
}
writer.endElement("changes");
writer.endDocument();
context.responseComplete();
}
}