Hi Daniel

Daniel Fagerstrom wrote:


Interesting!! Could you tell a litle bit more about how this construct works? What corresponds to the try block in ordinary exception handling
There is no corresponding try block in this case. See section 2.2 in
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102781075226697&w=2



IMHO the above code is complicated to follow and requires good knowledge about how continuations work to be graspable. I prefer the construction Ovidius construction proposed as it abstracts away the use of continuations.
I agree, that you need to be aware of  the existence of continuations.

Futhermore, in general one need different code for collecting request parameters for different form pages.
You can provide different such catch blocks in each function that collects request parameters.


What about implementing Ovidius construction with the concepts you described? Maybe something like the following could work:

// Similar to sendPage() in system.js
function formSendPageAndWait(uri, bizData, collectRequestParametersFun, timeToLive)
{
catch (continue) {
collectRequestParametersFun();
}
return sendPageAndWait(uri, bizData, collectRequestParametersFun, timeToLive);
}

I think that would also work.

Regards,

Chris


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

Reply via email to