On Thu, 12 Apr 2007 21:41:06 +0200, Joerg Heinicke <[EMAIL PROTECTED]> wrote: > On 12.04.2007 16:02, Franziska Witzani wrote: > >> According to the documentation I have (especially the book of Stephan >> Niedermeier), a continuation is a snapshot of the variables of the >> flowscript (by the time the continuation is created/saved) and a pointer > to >> the point of the flowscript which actually is being executed. >> >> I experienced, that this is not exactly the case. What seems to be saved >> within the continuation is not a snapshot of the variables, but only >> pointers to their values. >> >> (For example, if you have a counter, which is incremented after each >> "sendPageAndWait()" it will not be set back if you go back with >> continuations, but always hold the highest value.) > > They are indeed pointers, not snapshots. But this is only true for > objects. AFAIK there is no way to point to a primitive type, they are > always passed by value, not by reference. This means a simple counter > should indeed be resetted going back to an old continuation. But > somebody else can correct me on this. Torsten? > >> Is there a way to change that by configuring something, or will I have > to >> change the Cocoon-source code or find another way around it? > > No, there is no way to configure it. Actually I wonder how this should > be possible at all. How do you want to store and restore an object? I > can only imagine serializing and deserializing objects, but I'm not > aware of such an implementation. It would probably quite nice as you > don't need to care about any object state, but it's limiting to a > certain extend (to Serializable actually) and maybe not well performing.
I've never tried using it, but if I understand the Flowscript documentation correctly, cocoon.createPageLocal() will create an object that restores its state at the time the continuation was created. Franziska this may fill your need. --Jason --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
