Working beautifully now. I used ERXJSOpenWindowHyperlink so that the user clicking opens a neat small pop-up window "Your report is being generated." that runs the long response to generate the big download and initiate the download.

Thanks for UI guidance, Kieran

On Feb 24, 2006, at 9:56 PM, Kieran Kelleher wrote:

Thanks Chuck and Logan for the experienced tips,

Your answers confirm what I was realizing, although I had a slight hope that there was some trick like creating a dummy request using the original context to create a download response or something like that. I guess the new window strategy .... a small unobtrusive one to handle the long response for the pre-download file generation will work best for the user experience I am trying to achieve.

Regards, Kieran

On Feb 24, 2006, at 6:22 PM, [EMAIL PROTECTED] wrote:


Chuck Hill wrote on 02/24/2006 03:42:16 PM:

 >
 > On Feb 24, 2006, at 2:23 PM, Kieran Kelleher wrote:
 >
> > Is it possible for me to generate a response back to the user in a  
 > > separate thread without a matching request?
 > >
 > In a word, no.  That is the nature of http: request - response.
 >
 >
> > For example, let's say user clicks a link to download a huge file  
 > > that's going to take 1 minute to generate before it can be  
> > downloaded. Can I create a new Runnable class, push the WOContext   > > (I guess) to it and start it's run() and have that thread return a  
 > > response later using the WOContext while the user has gone off  
 > > browsing other pages? If so how do I return that response?
 > >
 > It is not a push technology, you can't force content into the  
 > browser, you can't force the browser to request content.
 >
 >
> > Right now, I use a long response task to generate the file and when   > > the task is done the download begins using a contentStream response   > > called by the end of the long response after the task is done. I   > > would like to alleviate the need for the user to wait for the file  
 > > to generate.
 > >
 > Open a new window for the download?

Opening a new window is probably the cleanest.

Just thinking out loud here: Another option might be to load it in a frame. Or if you have a "status bar" like section of your wrapper page template, it could use an internal IFrame to periodically poll the server and display status/messages. We currently use hidden IFrames to do Ajax-ish stuff on the same page, we've never tried it in a page wrapper, but I've been thinking about trying it out at some point. I don't know if there's a safe way to override appendToResponse and add some static status message div or something similar, but a page wrapper seems much cleaner.

Let us know how it goes.

Logan _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ kieran_lists%40mac.com

This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ kieran_lists%40mac.com

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to