Reputation: 3466
How can I get the upload button listener of component upload? This is because I want to validate other fields upon clicking the upload button. I've tried adding...
upload.addListener(new Upload.StartedListener() {});
It only works if there is already a chosen file but if the file is blank, it didn't.
Upvotes: 3
Views: 3006
Reputation: 21
No need to hide the 'Upload' Button with CSS.
Another simple way to hide:
Upload upload = new Upload("Caption", receiver);
upload.setButtonCaption(null);//will hide the Upload Button
Upvotes: 2
Reputation: 4967
Try to hide the submit button of Upload with CSS and create a button that calls:
upload.submitUpload();
Upvotes: 2