I am using the rich:fileUpload to upload a file, after that I click on the Clear button. The uploaded file is disappear, but the Add button still disable.
Below is my code
<rich:fileUpload fileUploadListener="#{bean.listener}"
maxFilesQuantity="1"
id="upload"
acceptedTypes="csv" immediateUpload="true" allowFlash="true">
<a4j:support event="onuploadcomplete,onuploadcanceled" reRender="upload"/>
</rich:fileUpload>
Please advise.
clearing the list is just client side operation with list. It doesn't resets the FU to make new files uploads available(as actually old one is on server).
http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf - sample shows list cleaning with the button. sources at http://jboss.org/richfaces/demos.
If you want to use just built in control - use a4j:support for onclear event and reRender the FU.