I am using the download component
source..
upload = new Upload(" ", new Upload.Receiver() {
@Override
public OutputStream receiveUpload(String filename, String mimeType) {
FileOutputStream fos = null ;
if(filename.length() > 0){
try {
tempFile = File.createTempFile(filename, ".txt", new File("/home/nap/scroll/") ) ;
} catch (IOException e) {
e.printStackTrace();
}
try {
fos = new FileOutputStream(tempFile) ;
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}else{
Notification.show(Messages.getString(Messages.Dialog_No_Selected_File),
"-",
Notification.Type.WARNING_MESSAGE);
portletUI.rePrint(request);
initListSelect();
}
return fos ;
}
});
I want to disable the download button, not the file select button.
When I pressed the file selection button and did not select the file, disable the download status.
I tried upload.setButtonCaption (null) but Exeption ... TT
How to disable the download button?
source
share