Re: Q: Redirect to a new page from a component
Re: Q: Redirect to a new page from a component
- Subject: Re: Q: Redirect to a new page from a component
- From: Michael Engelhart <email@hidden>
- Date: Sun, 8 Aug 2004 01:00:19 -0500
I think the idea is right I just don't know that it works the way
you're proposing.
If i create a page that says "Please Wait...", I want that page to be
fully returned to the browser so that the user will see it before
calling any long processing task. This has to happen before I can call
method that takes up time right? How do you propose calling that
method after the page response has already been sent? It seems like
it's too late at that point and if you call it anywhere before that
point it will behave just as if you didn't have the intermediate page.
What WOLongResponsePage does is generates the response page back to the
user saying please wait and at the same time splits off a thread that
goes and fetches the data or whatever long process needs to be done.
Then when the processing is done it notifies (via a refresh mechanism)
the original component that it's returned and then calls a method that
you override to display the result page.
I'm not saying it can't be done your way but it would seem that
WOLongResponsePage wouldn't exist if this were as simple as creating an
intermediate component.
Mike
On Aug 8, 2004, at 12:06 AM, Bill Reynolds wrote:
I'd call it from the page/component that displays the "Please wait..."
statement. I'm not familiar with WOLongResponsePage - although I
should be.
My idea is a bit crude. I'm suggesting that instead of having a long
delay
by the page submitting the form/query that you instead pass that
method-call
responsibility to a page that displays the desired "Please wait..."
statement.
This is beginning to appear to be very confusing to read. I'll try
again
below...
Okay, lets say your method is SendUserData(), and after this method is
called there is a really long wait that you want the customer to sit
through. If the ultimate goal is to merely display a page that tells
the
user to 'wait', then you may want to consider a broker method, one that
creates a new page, passes the component into it (the one your in),
and then
calls the method - thus displaying the appropriate page content.
I have no code to back this up, but it seems very plausible.
Am I missing the mark?
-Bill
on 8/7/04 9:50 PM, Michael Engelhart at email@hidden wrote:
Hi Bill -
Where do you call the method that creates the long background
operation
in your scenario?
I thought WOLongResponsePage was designed because you can't call a
page
after it's response has been output to the browser.
Do you have an example of how this would work?
Thanks
Mike
On Aug 7, 2004, at 11:14 PM, Bill Reynolds wrote:
Nick,
If I understand what you are trying to do is to put an intermediate
page
that let's the viewer know that a long background operation is
happening and
to not do anything in the mean time (don't click back, etc.).
Something
similar to when you submit a form on a travel site and await
ticketing
info
to be eventually returned.
The simple solution may to be to build this page (the Component that
displays the "hey, just keep waiting" msg) to be the one to actually
perform
the submission - so it would stay there until the server returns the
lengthily requested page of data. So instead of:
Component with request --> (long wait) --> Returned page
...you could have...
Component with request --> (pass request operation into another
Component
that is the "please hold on and don't hit back" that actually does
the
submission) --> Returned page
Hope this helps,
-Bill
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.