}
public CommandResponse actionExportSelectedKPIs(CommandRequest request) throws Exception {
// Export in XML format all the KPIs and data providers in the system.
ExportManager expMgr = DataDisplayerServices.lookup().getExportManager();
ExportOptions options = expMgr.createExportOptions();
options.setIgnoreKPIs(false);
options.setIgnoreDataProviders(false);
options.setKPIs(getSelectedKPIs());
options.setDataProviders(getSelectedDataProviders());
String xml = expMgr.format(options);
// Send XML bytes as a stream response.
int id = xml.hashCode();
if (id < 0) id = id*-1;