Holger Hoffstätte wrote:
Chrisitan Noack wrote:
  
In our application the processing of the data after a submit takes some
time. We'd like the client (browser) to be informed, that he/she has to
wait some time. When the processing is finished, we want the next page to
be shown. What is the best way achieve this with tapestry?
    

This is seemingly easy to do and very hard to do right. :)
In simple cases, it's probably much easier not to offload the proccessing to another thread... usually, you can get away with cheap tricks like gradually rendering the page... i have no idea how you can do that with tapestry though :)  but normally, you would do something like this:

- turn of all buffering, and do manual flush() calls...
- print the "Please wait.." message (plus some eyecandy :), flush()
- do your processing
- print out a META refresh that goes to the next page, flush()

if you want to make processing asynchronous and poll on a regular basis, go with a message queue, and Message Driven Beans...

    viktor






Reply via email to