cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Tekeshe" <tekes...@paynet.co.zw>
Subject Re: Howto Display a Progress Page / Bar
Date Wed, 25 Feb 2004 11:54:35 GMT
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" <uv@upaya.co.uk>
To: <users@cocoon.apache.org>
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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message