getSessionInfo().getExportResult().writeXMLversion(wos, BooleanParameter.value(panel.getParameterValue(PARAM_USE_BLANKS), false));
wos.close();
return new SendStreamResponse(new ByteArrayInputStream(bos.toByteArray()), disposition);*/
final String entryName = panel.getParameterValue(EXPORT_ENTRY_NAME) + "." + getExportManager().getAllowedEntryExtensions()[0];
final boolean useBlanks = BooleanParameter.value(panel.getParameterValue(PARAM_USE_BLANKS), false);
final ExportResult exportResult = getSessionInfo().getExportResult();
super.fireAfterRenderPanel(panel,request.getRequestObject(), null);
return new CommandResponse() {
public boolean execute(CommandRequest cmdReq) throws Exception {
HttpServletResponse response = cmdReq.getResponseObject();
response.setHeader("Content-Disposition", disposition);
response.setContentType(contentType != null ? contentType : "application/force-download");
ZipOutputStream zos = new ZipOutputStream(response.getOutputStream());
zos.putNextEntry(new ZipEntry(entryName));
OutputStreamWriter wos = new OutputStreamWriter(zos);
exportResult.writeXMLversion(wos, useBlanks);
wos.close();
return true;
}
};