AjaxUpdateLink and Downloading File
AjaxUpdateLink and Downloading File
- Subject: AjaxUpdateLink and Downloading File
- From: Raymond NANEON <email@hidden>
- Date: Thu, 21 Feb 2013 13:44:31 +0000 (GMT)
Hi,
I want to use AjaxUpdateLink to download an xml file
Here is the java method
public WOActionResults detailProjetXML(){
....
NSData xmlData = EditionsDetailProjets.detailXmlProjets(bindings, sess);
ERXResponse erxResp = new ERXResponse();
if (xmlData != null) {
erxResp.setHeader("maxage=1", "Cache-Control");
erxResp.setHeader("public", "Pragma");
erxResp.setHeader(fileName, "Content-Title");
erxResp.setHeader(CktlDataResponse.MIME_XML, "Content-Type");
erxResp.setHeader(String.valueOf(xmlData.length()), "Content-Length");
erxResp.setHeader("attachement; filename=\"" + fileName + "\"", "Content-Disposition");
erxResp.setContent(xmlData);
} else {
erxResp.setContent("");
erxResp.setHeader("0", "Content-Length");
}
return erxResp;
}
in wod :
ReportingXml : AjaxUpdateLink {
action = ""> name = "xml - détaillé";
_onComplete_ = "function() { menu.hideMenu(); }";
}
When I click on reportingXml link, nothing happens. There are no file to download.
What I am doing wrong?
Thanks for your help.
Envoyé depuis iCloud
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden