You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Net Dawg <ne...@yahoo.com.INVALID> on 2014/07/29 09:19:49 UTC

Turn Off or switch from Streaming to regular HTML

Hi I followed the instruction per below: 

http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF

However, 1) I would like HTML version to be rendering (in parallel with streaming)
         2) subsequent reloads should render HTML, not stream unless requested.

Basically, how would the streaming aspect be threaded separately and controlled?

Re: Turn Off or switch from Streaming to regular HTML

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 29 Jul 2014 05:38:14 -0300, Net Dawg <ne...@yahoo.com.invalid>  
wrote:

> How about question #2?  Resetting the streaming behavior?  After  
> streaming once, the page is stuck in streaming mode, does not do any  
> HTML anymore.

Again, in HTTP, one request, one response. Just make sure in your code  
you're always returning the correct one.
I cannot even think of a good scenario in which you'd like to switch from  
HTML rendering to StreamResponse or vice-versa.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Turn Off or switch from Streaming to regular HTML

Posted by Net Dawg <ne...@yahoo.com.INVALID>.
Thanks, Lance.  So problem #1 is probably best solved by rendering a whole new page, just have to pass/share/persist the request parameters.  


How about question #2?  Resetting the streaming behavior?  After streaming once, the page is stuck in streaming mode, does not do any HTML anymore.  



On Monday, July 28, 2014 9:42 PM, Lance Java <la...@googlemail.com> wrote:
 


What you're asking for is not possible with the http protocol. You can only have one response per request. 
You could achieve the behaviour you want by returning an html page response from the event. When the page loads, it uses window.open(...) to send a second request for the pdf in another window. 

Re: Turn Off or switch from Streaming to regular HTML

Posted by Lance Java <la...@googlemail.com>.
What you're asking for is not possible with the http protocol. You can only
have one response per request.

You could achieve the behaviour you want by returning an html page response
from the event. When the page loads, it uses window.open(...) to send a
second request for the pdf in another window.