cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: Upload widget for Woody: how to handle form redisplay?
Date Sun, 09 Nov 2003 19:58:02 GMT

Sylvain Wallez wrote:

> Ugo Cei wrote:
>> Sylvain Wallez wrote:
>>> A solution is to keep the uploaded content in a temp area until the 
>>> form is valid. But what if the user leaves and never re-submits the 
>>> form? Should we rely on the garbage collector to finalize() the 
>>> upload widget to clean the temp area?
>> How about catching the expiration of the continuation and removing the 
>> temp file from there?
> Good idea.
> For this, we'll need some kind of "ContinuationExpirationListener". But 

Maybe you can use the ContinuationsDisposer for this?

I added this during the making of 'Apples' to dispose resources (looked 
up components) your Apple might be holding

> they'll have to be registered in the continuation that _will_ be created 
> at the next sendPageAndWait, as the latest continuation represents a 
> past state, and may not exist if we just started the flowscript.

Hm, of course for apples it was slightly different, since there the 
use-case controller is one object-instance (and not multiple ones)

but maybe we can find a way to register this kind of clean-up stuff on 
the level of the complete use-case... or in flowscript lingo on the 
level of the continuations-tree (so it only gets executed if the last 
node in the tree is expired, and not upon clearing each node)

> I think we must also use the cleanup on finalize() for cases where forms 
> are used outside of flowscript (i.e. with actions).
> Sylvain

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                        

View raw message