cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Upload widget for Woody: how to handle form redisplay?
Date Sat, 08 Nov 2003 23:06:23 GMT
Hi all,

I'm attacking the problem of uploads in Woody. Upayavira started to work 
on this some time ago but hadn't the time to finish, so I asked him to 
send me the baby for it to continue growing.

But upload is a difficult problem when the nice form framework you use 
redisplays pages when a validation occurs. Let's consider a simple form 
with a "name" field (required) and a "file" upload widget.

What happens if the user selects a file but gives no name? The form is 
redisplayed, because the name is required, but the upload occurs! Should 
we discard the upload because the validation failed?

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?

Any idea or advice appreciated...


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message