cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <>
Subject WidgetValidator can't access upload's value if it was invalid on previous submit
Date Thu, 23 Nov 2006 08:22:45 GMT

Why does Upload.getValue() first check if it's valid, and if not, simply
returns null? This is a problem for validators that want to access the
uploaded file (the Part instance).

If I have a required upload field, then submit the form (without
uploading any file), the upload widget is invalid (which is correct).
Then, when I select a file and submit again (the file will be uploaded)
I can't access the part in my validator, as the Upload widget is still
invalid. Should there be an alternative method for accessing the part,
that doesn't check if the upload widget is valid?

This isValid() check before returning the Part is introduced after


View raw message