On Wednesday, November 5, 2003, at 03:23 PM, Reinhard Poetz wrote:
From: Jeremy Quinn
On Wednesday, November 5, 2003, at 01:06 PM, Reinhard Poetz wrote:
too!! ThereI am really impressed with the Cocoon Forms framework!! And the continuation-lifecycle 'catch' events work well.... but Iis one more event that some people could conceivably wantcompleted".do not know if it is possible .... "The Continuation hasexample (maybe
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 ausing 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.)?
it works fine .... but I think it has a different meaning .... it is when an existing continuation is resumed ... ie. when a Request comes back to a continuation-id.
Whereas what I was thinking about is being notifies of when the continuation-cycle is complete and the continuation is disposed of.
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).
Cool :)
regards Jeremy