1 Reply Latest reply on Aug 1, 2008 12:37 AM by hai yenbai

    fileupload, uploadItem getData is null

    hai yenbai Newbie

      Hi i tried fileupload demo , but i can not getdata of uploaded filebecause it is null, bytes of UploadItem return null.
      listener method

      public synchronized void listener(UploadEvent event) throws Exception{
       UploadItem item = event.getUploadItem();
       File file = new File();
       Object obj = this.getFiles().get(0);
       System.out.println (this.getFiles().size());

      jsp file
       <h:panelGrid columns="2" columnClasses="top,top">
       <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
       id= "upload" acceptedTypes="jpg, gif, png, bmp" uploadData="#{fileUploadBean.files}">