I use upload 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 Upload button - not file select button.
When I clicked file select button and did not select file, upload button disabled state.
I tried upload.setButtonCaption(null), However Exeption ... TT
How can I disabled upload button ?