2 Replies Latest reply on Oct 23, 2008 7:54 AM by arissonleal

    rich:fileUpload how to set uploadDat ?

    arissonleal

      In my Bean i have this:

      public List<UploadItem> itens = new ArrayList<UploadItem>();


      In my entity:
      @Lob
      private byte[] image;
      


      When i retrive my data from DB i'm trying to set the itens this way:
      itens.add(new UploadItem("image", "jpg", myEntity.getImage());


      but i don't have success with this, in my xhtml the rich:fileUpload don't show nothing. :(

      What could be wrong ?


        • 1. Re: rich:fileUpload how to set uploadDat ?

          Cannot understand your case...

          You uploaded the file, then put them in DB, then you got it from DB and added to UploadItem list. And you would fileUpload displayed the image through 'uploadData' attribute. Am I right?

          File upload component cannot to redisplay files uploaded. Please use external components for this purpose.

          • 2. Re: rich:fileUpload how to set uploadDat ?
            arissonleal

             

            You uploaded the file, then put them in DB, then you got it from DB and added to UploadItem list. And you would fileUpload displayed the image through 'uploadData' attribute. Am I right?

            Yes, you right!

            File upload component cannot to redisplay files uploaded. Please use external components for this purpose.

            ok.