• 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: [Ajax] - Returning a file after ajaxlongresponse
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ajax] - Returning a file after ajaxlongresponse


  • Subject: Re: [Ajax] - Returning a file after ajaxlongresponse
  • From: Daniele Corti <email@hidden>
  • Date: Mon, 05 Aug 2013 10:14:51 +0200

Hi Xavier,
I don't think you can use the callback of an AjaxLongResponse to serve a file. I think this, because that component use _javascript_ to perform a XMLHttpRequest and update the page with the result, so you cannot put the file in the response.
I think the easieat way would be to use the callback to show a link after the longresponse is done, that link has a binding to a method that compose a response with a file in attachment.

Hope this help.
Daniele

Hello,

I'm having some trouble trying to return a file after an ajaxlongresponse.

I'm currently have my callable task used through ajaxlongresponse (CCAjaxLongResponsePage), I'm generating a woresponse (which is actually a file) then hand back this woresponse to the controller component (which is my "regular" page where I also initiate the longresponse from.
I'd like the file to be downloaded without user interaction at the end of the task, but so far I'm just able to get the response into my controller (so if I make another link on the page to download it works, but I don't want this extra step).

Any help would be great as I'm running out of ideas on this one:)

Thanks,

Xavier

 _______________________________________________
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
 _______________________________________________
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: 
 >[Ajax] - Returning a file after ajaxlongresponse (From: Dev WO <email@hidden>)

  • Prev by Date: [Ajax] - Returning a file after ajaxlongresponse
  • Next by Date: Re: [Ajax] - Returning a file after ajaxlongresponse
  • Previous by thread: [Ajax] - Returning a file after ajaxlongresponse
  • Next by thread: Re: [Ajax] - Returning a file after ajaxlongresponse
  • Index(es):
    • Date
    • Thread