0 Replies Latest reply on Jun 24, 2011 10:08 AM by Gustavo Ludwig

    JSF2 + RichFaces4 - problem with <rich:fileUpload />

    Gustavo Ludwig Newbie

      Hi all,


      I've been at this problem for a little while now and would like some help with it. The issue is very similar to the one discussed here:



      My page calls has a <rich:fileUpload /> component which opens the file selector menu, uploads one and several files, autocloses, is resizeable, so I deem it to be working as should. It also has a fileUploadListener which points to a method on the managed bean. The issue here is that this method is never accessed.


      The page snippet:

      <rich:fileUpload id="popupFileUpload"

           title="Indique o caminho do arquivo a carregar"

           acceptedTypes="xls, xlsx"



           maxFilesQuantity="#{assemblyMB.uploadsAvailable}" listHeight="250"


           onuploadcomplete="#{rich:component('popup')}.hide(); return false;"

           noDuplicate="true" />



      The managed bean's listener method is this:

      public void listener(FileUploadEvent event) throws Exception {

           upFile = event.getUploadedFile();

           System.out.println("listener: " + upFile.getName());



      Whenever I try to upload a file (or files), the file(s) are uploaded properly on the component, but nothing seems to arrive at the managed bean.


      I uploaded two images for more information. Picture jbtools1.png shows the IDE (Eclipse Helios SR2), the list of libs, the managed bean method, some of the startup output (server: Apache Tomcat/6.0.32, JSF implemetation: Mojarra 2.0.6). Picture jbtools2.png shows the <rich:fileUpload /> component with one file uploaded - which produced no output expected from the listener.


      Please help me with debugging this!


      Thanks in advance,