You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Kevin C. Dorff" <kd...@kcp.com> on 2004/03/02 20:29:37 UTC
How to output status during long calculation?
I am converting an existing application to Tapestry. On some pages you
enter your search criteria and it performs a lengthly computation to
determine the results. This can take from no time at all to 30, 60, more
seconds.
In the current application, which is done with frames, in the results
frame I output a status message and then flush the output buffer then
output more status, flush the buffer, etc. When the computation is
finished the page's <body onload="function()"> funtion() executes, which
is responsible for steering to ANOTHER page which actually displays the
results.
Can anybody give me a hint how they would do this in Tapestry? The
answer isn't jumping out at me.
Kevin
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to output status during long calculation?
Posted by Jason Vasquez <ja...@obiwan.homelinux.org>.
Kevin,
I haven't done it in Tapestry, but in other apps, I have borrowed from
the way that sites like Expedia, etc. use. Basically, load in intermediate
page with an animated .gif that gives the illusion of something happening
("You're search is running, blah, blah"). (Maybe a background thread is doing
the actual processing?) Anyway, the page reloads after a few seconds via
either javascript or a meta tag, and checks to see if the request is done. If
so, you are taken to the result page, otherwise, you look at the animation again.
Make sense?
-jason
On Tue, Mar 02, 2004 at 12:29:37PM -0700, Kevin C. Dorff wrote:
> I am converting an existing application to Tapestry. On some pages you
> enter your search criteria and it performs a lengthly computation to
> determine the results. This can take from no time at all to 30, 60, more
> seconds.
>
> In the current application, which is done with frames, in the results
> frame I output a status message and then flush the output buffer then
> output more status, flush the buffer, etc. When the computation is
> finished the page's <body onload="function()"> funtion() executes, which
> is responsible for steering to ANOTHER page which actually displays the
> results.
>
> Can anybody give me a hint how they would do this in Tapestry? The
> answer isn't jumping out at me.
> Kevin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
--
-------------------------------------------------------------------
| | |
| Jason Vasquez | When their numbers dwindled from |
| jason@obiwan.homelinux.org | 50 to 8, the other dwarves began |
| http://obiwan.homelinux.org | to suspect Hungry. |
| | |
|------------------------------------------------------------------
| Public Key: http://obiwan.homelinux.org/~jason/pubkey.txt |
-------------------------------------------------------------------
Re: How to output status during long calculation?
Posted by "Kevin C. Dorff" <kd...@kcp.com>.
Yeah, a custom service is probably the solution I need. Thanks.
Kevin
Paul Ferraro wrote:
> Can't this be done with a custom service? You can manipulate the
> output stream directly from the ResponseOutputStream parameter in the
> service method.
>
> Paul
>
> Kevin C. Dorff wrote:
>
>> I am converting an existing application to Tapestry. On some pages
>> you enter your search criteria and it performs a lengthly computation
>> to determine the results. This can take from no time at all to 30,
>> 60, more seconds.
>>
>> In the current application, which is done with frames, in the results
>> frame I output a status message and then flush the output buffer then
>> output more status, flush the buffer, etc. When the computation is
>> finished the page's <body onload="function()"> funtion() executes,
>> which is responsible for steering to ANOTHER page which actually
>> displays the results.
>>
>> Can anybody give me a hint how they would do this in Tapestry? The
>> answer isn't jumping out at me.
>> Kevin
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to output status during long calculation?
Posted by Paul Ferraro <pm...@columbia.edu>.
Can't this be done with a custom service? You can manipulate the output
stream directly from the ResponseOutputStream parameter in the service
method.
Paul
Kevin C. Dorff wrote:
> I am converting an existing application to Tapestry. On some pages you
> enter your search criteria and it performs a lengthly computation to
> determine the results. This can take from no time at all to 30, 60,
> more seconds.
>
> In the current application, which is done with frames, in the results
> frame I output a status message and then flush the output buffer then
> output more status, flush the buffer, etc. When the computation is
> finished the page's <body onload="function()"> funtion() executes,
> which is responsible for steering to ANOTHER page which actually
> displays the results.
>
> Can anybody give me a hint how they would do this in Tapestry? The
> answer isn't jumping out at me.
> Kevin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org