0 Replies Latest reply on May 29, 2009 10:32 AM by Michael Knapp

    3.3.1 GA on Firefox 3.0.10 - poll / fileUpload problem

    Michael Knapp Newbie

      In Firefox 3.0.10 the file upload control does not
      really work anymore - selected files do not show up in upload list anymore -
      after the poll has rerendered parts of the page, whereas the in Internet Explorer 8
      everything seems to be ok.

      Does not work in:
      *) Firefox 3.0.10 (Windows)
      *) Google Chrome 2 beta (2.0.172.30)

      Works in:
      *) Safari 3.2.3 (525.29, Windows)
      *) Opera 9.64 (Build 10487, Windows)

      Page code

      <f:view>
       <a4j:region>
       <a4j:form id="PollForm" >
       <a4j:poll id="poll" interval="1000" reRender="filePanels" />
       </a4j:form>
       </a4j:region>
      
       <a4j:region>
       <a4j:outputPanel id="filePanels" >
       <rich:panel header="Files" switchType="client" >
       <h:outputText value="#{test.timestamp}" />
       <br />
       <br />
       <a4j:repeat value="#{test.files}" var="file" >
       <h:outputText value="#{file}" />
       <br />
       </a4j:repeat>
       </rich:panel>
       </a4j:outputPanel>
      
       <a4j:form ajaxSingle="true" >
       <a4j:outputPanel id="panels" >
       <rich:panel header="Upload" switchType="client" >
       <rich:fileUpload fileUploadListener="#{test.importUploadListener}"
       id="importUpload" autoclear="true" allowFlash="false" immediateUpload="false"
       maxFilesQuantity="1000" listWidth="100%" >
       </rich:fileUpload>
       </rich:panel>
       </a4j:outputPanel>
       </a4j:form>
       </a4j:region>
      </f:view>
      


      Bean code

      package test;
      
      import java.util.ArrayList;
      import java.util.List;
      import org.richfaces.event.UploadEvent;
      import org.richfaces.model.UploadItem;
      
      public class TestBean
      {
       private List<String> files = new ArrayList<String>();
      
       public TestBean()
       {
       }
      
       public void importUploadListener(UploadEvent event)
       {
       UploadItem ui = event.getUploadItem();
       files.add(ui.getFileName());
       }
      
       public List<String> getFiles()
       {
       return files;
       }
      
       public String getTimestamp()
       {
       return "" + System.currentTimeMillis();
       }
      
      }