2 Replies Latest reply on Aug 27, 2009 11:14 AM by stuntmonkey

    Issue with rich:fileUpload not refreshing components after

    stuntmonkey

      I'm trying to upload a text file using the rich:fileUpload component, then set the text of a h:outputText component to the data in the textfile. Here's the code snippet from my jspx page:

      <rich:fileUpload fileUploadListener="#{myBean.uploadListener}"
       maxFilesQuantity="3"
       id="upload"
       listHeight="400"
       listWidth="400"
       addControlLabel="Upload"
       immediateUpload="true"
       allowFlash="false">
       <a4j:support event="onuploadcomplete" reRender="fileText" />
      </rich:fileUpload>
      
      <h:outputText value="#{myBean.body}" id="fileText"/>
      


      I've got a log printout in myBean.uploadListener, so I can see that myBean.body is actually getting set to the value of the textfile. However, "fileText" never appears to get updated with the new value.

      When I searched the web for information, I found this bug (which makes it sound like "onuploadcomplete" is just plain broken).

      .. and I would normally just shrug and wait for the bugfix. However, I'm confused since the livedemo for rich:fileUpload appears to successfully use "onuploadcomplete" to re-render their "Upload Files Info" panel. I'm using the same version of richfaces as they are, 3.3.1.GA.

      So I'm a little stumped ... any ideas what's going on?