On Saturday, Dec 14, 2002, at 12:33 US/Pacific, Ugo Cei wrote:

Christopher Oliver wrote:

In this case to go back to the beginning you don't need a continuation. You can just call the function again.
Which wouldn't work if you have some code at the beginning of the function that is to be executed only once.
This is true. It also won't work if you plan to keep the value of the local variables, since calling the function will start with a fresh set of values for them.

One solution would be to define a pseudo-continuation, just after you finish the function initialization code, which could be referred from the View page template. Something like:

function myFunc()
{
var a;
// Long initialization code here

startForm(); // Creates a dummy continuation, with no page
// being sent to the browser
...
sendPage("1.xml");

sendPage("2.xml");
}

The parent continuation of the first sendPage() is now the one defined by startForm(), so referring to the previous continuation now makes sense.

I think this solves the problem you mention.

Regards,
Ovidiu


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to