On Thursday, October 4, 2007, 7:44:44 AM, Vit <[EMAIL PROTECTED]> wrote:
> Hallo, > how can I force from a middle of the loop, which may run up to few > minutes to update a component's value? > I am manipulating a lot of files and I would like to let the user know > how much of the processing is already done. > I would like to start processing the files when user reaches certain > page and on this same page I want to display statistics of the process. > As an example I tried to use a Clock from your ajax example, but I > cannot manage it to update during running of the loop. I thought of > achieving it somehow with threads, is this right direction? > What is the correct way to do it? Spin off a worker thread to do the processing. This thread has to periodically update a (shared) field to show the progress. Independently, your page needs to periodically poll the server (best via AJAX) to retrieve the value of the shared field - this is where the AjaxSelfUpdatingBehavior in the Clock example belongs. Unlike Swing, with web-apps, you can't 'push' from the worker thread, just 'pull' from the client. /Gwyn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
