I've just realised I was wrong in what I said - or rather, not quite exact. It is simpler than I said.
What you do is immediately send back a page that says "wait..." and does an immediate refresh to another page. This other page, when requested, starts doing your slow processing. When finished, it displays the answer. It can take a while to load, and in the meanwhile, the temporary "wait" page shows.
Regards, Upayavira
David Tekeshe wrote:
Thanks Upayavira,
I had taken a break. Let me immerse myself in it & will let you know how it goes.
Thanks for the automatic refresh trick - I haven't thought of it - I'm going to do some research / implementation in the next two days or so. I would have been nice to grab a quick example.
David Tekeshe
----- Original Message ----- From: "Upayavira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 24, 2004 11:27 AM Subject: Re: Howto Display a Progress Page / Bar
David Tekeshe wrote:
How do I display a progress / please wait page? The following code snippet is not working.
Thanks in advance
// flow.js
// ...
cocoon.sendPage("html/wait.htm");
for(var row = 0; row < repeater.getSize(); row++) { var isSelected = repeater.getWidget(row, "select").getValue().booleanValue(); if (isSelected) { var msgId = repeater.getWidget(idx, "reference").getValue(); var xpath = "/msg/msg-id[text()='" + msgId + "']"; var dbxmlAdaptor = new Packages.zw.co.eswitch.adaptor.DBXMLAdaptor(xpath); if (submitBtn == "auth1") { dbxmlAdaptor.update("status", "AUTH-2"); print("Message : " + msgId + " status changed to AUTH-2"); } } }
cocoon.sendPage("html/done.htm");
/
No. Of course that wouldn't. Firstly, you need to use sendPagaAndWait() in order for processing to continue. Secondly, the processing continues when the user has submitted the page you've sent, not as soon as the page has been sent.
To do this, what you'd have to do is initiate a background process to do the calculation, send them a page that says "please wait", and has an automatic refresh <meta> tag, set to, say, 2 seconds, pointing at a second page. This second page, when loaded, then collects the results of the background process.
I'm afraid, as far as I can see, there's no easy way to get around this using Flow.
But I'd be delighted to be corrected.
Regards, Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
