From: Jeremy Quinn
>
> On Wednesday, November 5, 2003, at 01:06 PM, Reinhard Poetz wrote:
>
> >> I am really impressed with the Cocoon Forms framework!!
> >> And the continuation-lifecycle 'catch' events work well
> too!! There
> >> is one more event that some people could conceivably want
> .... but I
> >> do not know if it is possible .... "The Continuation has
> completed".
> >>
> >> Many thanks guys!
> >
> > Sorry, but I haven't got what you mean with "The Continuation has
> > completed". When is this event reached? Can you give a
> example (maybe
> > using some code)?
>
> This is what I am thinking about:
>
> If you take this code snippet here:
>
> . . .
> // get the User
> form.load (user);
> session.close();
> form.showForm (formURI);
> session = factory.createSession ();
> form.save (user);
> // save the User
> . . .
>
> The line "session.close();" in the sample above, could be replaced by
> this (obviously after the snippet):
>
> catch (break) {
> session.close();
> }
>
> because it will be called just as a continuation is about to start
>
> whereas the line "session = factory.createSession ();" does
> not have an
> equivalent handler that would trigger after all continuation handling
> has completed.
IIU Sylvain's docs correctly
(http://wiki.cocoondev.org/Wiki.jsp?page=RhinoWithContinuations)
catch (continue) {
session = factory.createSession ();
}
should do it. Doesn't it work for you (I haven't tried it yet.)?
If not you'll have to wait for my interceptions implementation (<hint>or
help me finishing it <hint/> ;-) which would fill this gap.
Currently I haven't much time doing it (but hopefully things change in
the next weeks - expect more work on this then).
--
Reinhard