4 Replies Latest reply on Jan 25, 2010 10:53 AM by agallo73

    rich:fileupload problems that should be addressed

    agallo73

      Hello, I'm using the a4j:mediaoutput component but I see that there are several problems that prevent my manager for giving me the ok to use richfaces.

      These are the problems I found:

       

      1) Pdf files rendering does not work on microsoft IE 8 and a red  X is dispalyed in place of the preview.

       

      I'm using richfaces 3.3.0 and despite the fact that I saw in some discussion that this problem has been fixed in the 3.1 release, I still have this problem.

       

      2) If I use the rich:fileupload component to upload files and enable flash, then  pdf rendering does not work any more even on firefox.So multiple file upload is not possible if I want to keep the preview of the uploaded files.

       

      3) rich:mediaoutput does not render microsoft office files. I read several discussions on classid, object tags but I'm unable to make my code work.

      I also saw that a required fix has already been addressed as an enhancement but nothing is said as far as the date it will be released. In the mean while, being it a common problem, I hope that someone has already dealt with it and found a solution.

       

       

      I think that richfaces are really great but fixing some common problems may rend them more usable and confortable.

       

      So please help me. I'm in a hurry and must take a decision and would not like to switch to an other framework for these problems.

       

      Thanks in advance.

       

      Antonio

        • 1. Re: rich:fileupload problems that should be addressed
          nbelaevski

          Hi Antonio,

           

          The mentioned issues look like environment problems (like IE8 & PDF issue), and not issues of rich:fileUpload component itself. Uploading files to the server is the only functionality of the component. So, can you please clarify if you have problems with the upload itself (e.g. data is broken while uploading, listeners are not called, etc.) or no?

          agallo73 wrote:

           

          I also saw that a required fix has already been addressed as an enhancement but nothing is said as far as the date it will be released. In the mean while, being it a common problem, I hope that someone has already dealt with it and found a solution.

          Can you give a link to this enhancement?

          • 2. Re: rich:fileupload problems that should be addressed
            agallo73

            Hello Nick, in my mail I refer to problems with the a4j:mediaoutput component.

             

            Rich:fileupload is just used to upload data to the server. Then the mediaoutput provides file preview after uploading.

             

            Tht said this is the code: It's partly taken from the online demo changing the element attribute to object and the mimeType to application/pdf.

             

             

            <a4j:mediaOutput element="object"
                              value="#row" createContent="#(FileUploadBeanBean.paint}"

                              mimeType="application/pdf" id="pdf-preview" cacheable="false"
                              session="true" width="300" height="300" />
                        </a4j:mediaOutput>


            If you try to run the onlinerich:fileupload  demo with ie 8 and modify the code as shown above to render pdf files it does not work. The preview shows a red box for pdf files. It works with firefox. Setting classid does not work either.

            Moreover if you  set the useflash flag  for the rich:fileupload componet in order to allow multiple selections ( users are bored of constantly opening the file upload browser many times) pdf preview does not work any more neither on firefox.


            You can easily reproduce these behaviours on your machine. I tried on several  client machines and the result is the same.

            Moreover there's no way to open office documents with the mediaoutput component.

            If you succed in making these things work, please give me the code so that I can try it.
            • 3. Re: rich:fileupload problems that should be addressed
              ilya_shaikovsky
              so the problem not in upload itself but in displaying PDF. check please this dev sample. It was used to check PDF files output.
              • 4. Re: rich:fileupload problems that should be addressed
                agallo73

                I'll try your sample and let you know.

                 

                Consider that your sample is enough simple and points to a static file name.

                 

                I think that I should try with something more dinamic to see if it really works.

                 

                May you please try the rich:fileupload demo with pdf files correcting just some things as already stressed (and that you know better than me :-) ) and check the behaviour of the mediaoutput component witt pdf files when the use flash option is setted?

                 

                 

                Have you got some information as far as showing office documents in mediaoutput is concerned?

                 

                Is it possible that noone has ever had this problem?

                 

                Thanks.

                 

                Bye