8 Replies Latest reply on Mar 11, 2010 5:15 AM by fafhrd83

    rich:fileupload compatibility with IE7

    fafhrd83

      Hello,

       

      I use the rich:fileupload component for a while and it works but i have some trouble with IE7.

       

      Sometimes, when i use it, my navigator freezes and my CPU go to 99% (i have to kill IE7 then). This happens always after an upload with this component.

       

      Is someone have an idea to help me solve this problem ?

        • 1. Re: rich:fileupload compatibility with IE7
          ilya_shaikovsky
          • 2. Re: rich:fileupload compatibility with IE7
            fafhrd83

            I tried with RichFaces 3.3.3 RC1... and it still doesn't work but a bit differently.

             

            In IE7, i upload a lot of file refreshing the datatable where they are show. When i'm doing another action in the page after that, the page freezes (action like switching page in the datatable or deleting a file (other action i created).

             

            I'm using Facelets... don't know if it has any impact.

             

            A bit more information :

            Mmm... it seams to be a problem with the ajax reload of my Datatable. The navigator never finished to load the page : he is trying to get the file /a4j/g/3_3_2.SR1org.richfaces.renderkit.html.iconimages.DataTableIconSortDesc...

            • 3. Re: rich:fileupload compatibility with IE7
              ilya_shaikovsky
              we need some ready sample to investigate because we have no such behavior using out testing samples.
              • 4. Re: rich:fileupload compatibility with IE7
                fafhrd83

                Sorry haven't a lot if time.

                 

                I'm working of doing easy sample and i post it here.

                • 5. Re: rich:fileupload compatibility with IE7
                  fafhrd83

                  ok, there is a sample code here :

                  <html xmlns="http://www.w3.org/1999/xhtml"
                        xmlns:ui="http://java.sun.com/jsf/facelets"
                        xmlns:h="http://java.sun.com/jsf/html"
                        xmlns:f="http://java.sun.com/jsf/core"
                        xmlns:a4j="http://richfaces.org/a4j"
                        xmlns:rich="http://richfaces.org/rich"
                        >
                      <ui:composition template="/WEB-INF/templates/template.xhtml">
                          <ui:define name="contenu">
                              <h:form>
                                  <a4j:keepAlive beanName="testRichFileUploadBean" />
                                  <h1>Test FileUpload</h1>
                                  <br />
                                  <rich:fileUpload
                                      doneLabel="#{msg.ESP_depotTermine}"
                                      addControlLabel="#{msg.ESP_ajouter}"
                                      uploadControlLabel="#{msg.ESP_deposer}"
                                      cancelEntryControlLabel="#{msg.ESP_anuler}"
                                      clearControlLabel="#{msg.ESP_effacer}"
                                      clearAllControlLabel="#{msg.ESP_toutEffacer}"
                                      progressLabel="#{msg.ESP_enCours}"
                                      sizeErrorLabel="#{msg.ESP_tailleTropImportante}"
                                      stopEntryControlLabel="#{msg.ESP_arreter}"
                                      stopControlLabel="#{msg.ESP_toutArreter}"
                                      transferErrorLabel="#{msg.ESP_erreurTransfert}"

                                      listHeight="116px"
                                      listWidth="400px"

                                      noDuplicate="#{testRichFileUploadBean.noDuplicate}"
                                      autoclear="#{testRichFileUploadBean.autoclear}"
                                      immediateUpload="#{testRichFileUploadBean.autoUpload}"
                                      allowFlash="#{testRichFileUploadBean.useFlash}"
                                      maxFilesQuantity="#{testRichFileUploadBean.maxFilesQuantity}"

                                      fileUploadListener="#{testRichFileUploadBean.listener}"
                                      />
                                  <br /><br />
                                  <h:commandButton action="#{testRichFileUploadBean.envoyer}" value="Envoyer" />
                              </h:form>
                          </ui:define>
                      </ui:composition>
                  </html>

                   

                  I test with a minimal fileUploadListener (witch is doing nothing) and the bug persist.

                   

                  I tried to remove all Label attribute and the bug disapears... and just without noDuplicate, autoclear, immediateUpload and alloFlash, the bug disapears too. It seams that the bug don't happen if there is not too many parameters.

                   

                  This is the listener i used just before :

                   

                  public class TestRichFileUploadBean implements Serializable {

                      private static final Logger LOG = Logger.getLogger(TestRichFileUploadBean.class);

                      private boolean autoUpload = false;
                      private boolean useFlash = false;
                      private boolean noDuplicate = true;
                      private boolean autoclear = true;
                      private int maxFilesQuantity = 5;

                      public TestRichFileUploadBean() {
                          LOG.debug("Initialisation()");
                      }

                      public synchronized void listener(UploadEvent event) throws TechniqueException, LettranetException {
                              LOG.debug("listener(UploadEvent event) : " + event.getUploadItem().getFileName());
                              UploadItem item = event.getUploadItem();

                              LOG.debug("file.getLength() : " + item.getFileSize() + " - file.getName() : " + item.getFileName() + " - file.getData() : " + item.getData());
                              LOG.debug("FIN listener(UploadEvent event)");
                      }
                      
                       ... (getters and setters)
                  }

                   

                  I hope you will find the problem now...

                  • 6. Re: rich:fileupload compatibility with IE7
                    ilya_shaikovsky
                    mmm stil not getting such behavior maybe let's try war file? I checked under richfaces-demo environment with tomcat 6. The only difference used IE 8 in IE 7 mode.
                    • 7. Re: rich:fileupload compatibility with IE7
                      fafhrd83

                      You should really try with IE7 (not with IE8 with compatibility : it works well).

                      I'm using my web app with Glassfish v2.

                       

                      I'll try to make a war file but it will take a little time to compose a sample.

                      • 8. Re: rich:fileupload compatibility with IE7
                        fafhrd83
                        I created a sample war witch don't work with IE7.