2 Replies Latest reply on Oct 28, 2008 10:01 AM by Dirk Mallon

    FileUpload not firing uploadEvent  (3.2.0GA)

    Dirk Mallon Newbie

      hello !

      I'm testing <rich:fileUpload> and it works on clientside. But I can't get the data on serverside. Because fileUploadListener-Method is not called !
      I read for hours , but didn't find a solution.

      Listener and Property in TestUploadBean

      public ArrayList files=null;


      public TestUploadBean() {

      files=new ArrayList();
      if (log.isDebugEnabled()) {
      log.debug("KONSTRUKTOR...");
      }
      }


      public ArrayList getFiles() {
      if (log.isDebugEnabled()) {
      log.debug("getFiles called");
      }
      if (files==null) {
      files=new ArrayList();
      }
      return files;
      }




      public void setFiles(ArrayList files) {
      if (log.isDebugEnabled()) {
      log.debug("setFiles called size>>" + files.size());
      }
      this.files = files;
      }


      public void uploaded(org.richfaces.event.UploadEvent ue) {
      if (log.isDebugEnabled()) {
      log.debug("Listener called!!");
      }
      ...


      faces-config entry

      <managed-bean>
      <managed-bean-name>_UploadBean</managed-bean-name>
      <managed-bean-class>
      com.test.TestUploadBean
      </managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      jsp-content

      <rich:fileUpload acceptedTypes="xml,zip"
      uploadData="#{_UploadBean.files}"
      maxFilesQuantity="2"
      fileUploadListener="#{_UploadBean.uploaded}"
      id="uploadlist" >
      </rich:fileUpload>




      all further properties of the Bean where used the right way by faces,
      but the Listener is not called. Anybody knows why?

      thx in advance

      Dirk