1 Reply Latest reply on Dec 3, 2008 8:55 AM by Ilya Shaikovsky

    <rich:fileUpdate uploaded only one file and the panel is cle

    Blochaou Blochaou Newbie

      i'm using rich:fileUpload to upload file in my application. The component uploads only one file and after the uploading the panel is clean. I'm using richfaces 3.2.2. Can any boby help me?
      Thanks

       <rich:fileUpload addControlLabel="Parcourir.."
       uploadControlLabel="Charger"
       clearAllControlLabel="Effacer tout"
       clearControlLabel="Effacer"
       stopEntryControlLabel="Arrêter"
       maxFilesQuantity="3"
       listHeight="170px"
       autoclear="false"
       uploadData="#{RegisterBackingBean.fileListe}"
       id="fileUpload"
       fileUploadListener="#{RegisterBackingBean.uploadFile}"
       acceptedTypes="jpg">
       <f:facet name="label">
       <h:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}" />
       </f:facet>
      
       <a4j:support event="onuploadcomplete" reRender="info" />
       </rich:fileUpload>
      

       public void uploadFile(UploadEvent event) {
       this.fileListe.clear();
       if (event.getUploadItems() != null) {
       for (UploadItem item : event.getUploadItems()) {
       UploadFile upfile = new UploadFile();
       upfile.setData(item.getData());
       upfile.setFile(item.getFile());
       upfile.setFileLength(item.getFileSize());
       upfile.setFileName(item.getFileName());
       this.fileListe.add(upfile);
      
      
       }
       }
       }