1 Reply Latest reply on Oct 25, 2010 6:32 AM by Ilya Shaikovsky

    Tab icon keeps refreshing after using rich:fileUpload

    Leonid Sokolin Newbie

      I have noticed some strange behaviour, when I use rich:fileUpload component. After I upload the file and process it in my code, icon on IE tab keeps refreshing as if processing is still continues.


      Could anybody advise what could be done to prevent it?


      I attached the code below.


      Front end.





      <rich:fileUpload fileUploadListener="#{piCopyPerformanceBean.fileListener}"


      id="upload" allowFlash="auto" addControlLabel="Browse"


      immediateUpload="true" listHeight="0px" listWidth="180px"




      acceptedTypes="csv, txt">


      <a4j:support event="onuploadcomplete" reRender="upload" ajaxSingle="true" />








      Supporting bean.





      final UploadItem item = event.getUploadItem();


      final Vector<String> acctCodes = new Vector<String>();


      if (item.isTempFile()) {


      final File file = item.getFile();


      final BufferedReader br = new BufferedReader( new FileReader(file));

      String line;


      while (( line = br.readLine()) != null){






      LOG.info("Absolute Path : '" + file.getAbsolutePath() + "'!");



      else {


      final byte[] data = item.getData();


      final String accts = new String(data);


      LOG.error("NOT IMPLEMENTED");





      final List<String> lst102Accounts = accountManager.get102Accounts();


      for (final String acctCode : acctCodes) {

      copyCOMProdPerf(acctCode, lst102Accounts.contains(acctCode.trim()));



      void fileListener(UploadEvent event) throws Exception {