[Seaside] WAFileUpload how to detect cancel button ?

Tim Murray tmurray at ecsorl.com
Wed Aug 11 13:17:45 UTC 2010

I am developing a simple wrapper component for WAFileUpload using the
MessageComponent from the Hasso Plattner Institut tutorial



The idea is to display messages to the user to give them hints on how to
use it.


For example, when the component is first loaded, I display "Click The
'Choose File' Button To Select A File To Upload"

After the user selects a file, I display ""Click The 'Upload File'
Button To Upload Your File"

After the File uploads, I display "File Uploaded"


Simple works fine.


Here is the renderContentOn: html

renderContentOn: html

            html div


                        class: self messageType, 'Message';

                        with: self messageString.

                        html form


                                    with: [

                                                html fileUpload 

                                                            callback: [
:newfile | fileToUpload:=newfile] ;

((html jQuery: '#message') text: 'Click ''Upload File'' to upload') .

                                                html  submitButton

callback:[self handleUpload];

'Upload File'.



However, if the user clicks "Cancel" on the file selector popup that is
displayed, I would like to change my info message accordingly.


Anybody have an idea how to do that?






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100811/2cd59d01/attachment.htm

More information about the seaside mailing list