<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 10/14/2015 6:26 AM, Joerg Fallmann
wrote:<br>
</div>
<blockquote cite="mid:561E4A08.5060007@tbi.univie.ac.at" type="cite">Dear
John,
<br>
<br>
what I would like to do is to stay in one route,
<br>
display whatever information I already have,
<br>
so that the user can start reading output,
<br>
while I continue processing until I have everything I need
<br>
and update what the user can see with the final information.
<br>
</blockquote>
That is what I get when I pull the info after I've loaded the first
chunk.<br>
<blockquote cite="mid:561E4A08.5060007@tbi.univie.ac.at" type="cite">
<br>
So similar to what delayed does when I use strings as content,
<br>
with the difference that I would like to use templates filled with
<br>
the initial content and update that templates content once
processing
<br>
is done.
<br>
<br>
So far I have a myhost/welcomepage where the user can select some
stuff
<br>
and is then redirected to myhost/results. From the user input I
can
<br>
quickly create some content, but some other content takes some
time,
<br>
and I would like to show what I have fast at myhost/results and
update
<br>
myhost/results when the rest is done without redirecting to yet
another route,
<br>
instead of computing everything and then /push/ it to the user
after minutes.
<br>
</blockquote>
That sounds very much like what I do. I show the initial page, let
the user select the desired info and then I go to the appropriate
route. I display initial info in a header and footer, and then a js
onLoad function grabs the remaining data from another route (similar
to your results route). Sometimes that's a lot of JSON data and can
take some time do download. I use datatables for the actual load and
display for some of the routes.<br>
<blockquote cite="mid:561E4A08.5060007@tbi.univie.ac.at" type="cite">
<br>
@Amelia, I was playing around with delayed, and for me it works as
expected
<br>
when I only want to return simple stuff like in the manual, but
when I try to
<br>
use templates as content nothing happens until the very end of the
route,
<br>
so just the final output is created and no in-between output.
<br>
<br>
Hope what I want to do is possible with Dancer2
<br>
<br>
--joerg
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
John J. McDermott, CPLP<br>
Learning and Performance Consultant<br>
jjm at jkintl.com 575/737-8556<br>
Check out my <a href="http://cybersecurity.learningtree.com">
security blog posts</a><br>
Add an A for the Arts To STEM and get STEAM and a strong engine to
move forward. </div>
</body>
</html>