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= -- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://radio.weblogs.com/0116284/ [EMAIL PROTECTED] [EMAIL PROTECTED]
