hai.. am exporting xml file using save dialog box and i need to know whether user save the exported file are not by checking which button is clicked on save dialog box (save or cancel) is it possible please help me

Thank you

Recommended Answers

To get help, you need to provide relevant code and more details with regard to what's not working, etc..

Jump to Post

All 2 Replies

To get help, you need to provide relevant code and more details with regard to what's not working, etc..

thank you

here is my code..
Document document = getExportedXML();
TransformerFactory transformerFactory =TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
// here document is xml content
DOMSource source = new DOMSource(document);
response.setContentType("text/xml; charset=UTF-8");
response.setHeader("Content-disposition","attachment; filename=\"" + exportedFileName+ "\"");
PrintWriter out = response.getWriter();
StreamResult result = new StreamResult(out);
transformer.transform(source, result);

this code will opens save dialog box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.