• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AjaxUpdateLink and Downloading File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AjaxUpdateLink and Downloading File


  • Subject: Re: AjaxUpdateLink and Downloading File
  • From: Johann Werner <email@hidden>
  • Date: Sat, 23 Feb 2013 22:05:10 +0100

Hi Raymond,

for file downloads you should use normal WOHyperlink and not the ajax kind.

jw


Am 21.02.2013 um 14:44 schrieb Raymond NANEON <email@hidden>:

> 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 = ctrl.detailProjetXML;
>     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


References: 
 >AjaxUpdateLink and Downloading File (From: Raymond NANEON <email@hidden>)

  • Prev by Date: Re: REST PUT request creating related objects rather than just updating them
  • Next by Date: Re: ERJGroupsSynchronizer Configuration Question
  • Previous by thread: AjaxUpdateLink and Downloading File
  • Next by thread: copy and pasting Word Formatted text.
  • Index(es):
    • Date
    • Thread