1 Reply Latest reply on Jun 23, 2009 9:55 AM by ilya_shaikovsky

    file upload problem

      Hi all,

      I am currently trying to implement the rich:fileUpload feature as described in the exadel demo application of rich faces. My problem is that the class FileUploadBean used in the demo application in exadel does not compile.
      I have copied and pasted the code they provide but it does not compile for the following reasons:

      On this method:
      public void listener(UploadEvent event) throws Exception{
      UploadItem item = event.getUploadItem();
      File file = new File();
      file.setLength(item.getData().length);
      file.setName(item.getFileName());
      file.setData(item.getData());
      files.add(file);
      uploadsAvailable--;
      }

      The file has no setLength method... I have imported java.io.File and checked. set length does not exist in the interface of file.

      Are you guys using some kind of other file interface for this?


      Kind Regards,
      Ioannis