2 Replies Latest reply on Sep 3, 2008 9:40 AM by zoltanverebes

    rich:fileUpload does not call fileUploadListener

    zoltanverebes

      Hi all,

      I am trying to use rich:fileUpload tag, but it does not call fileUploadListener in my backing bean when uploading is done. It creates the temporary file in my TEMP directory on the server.

      I use Richfaces 3.2.1.GA with seam 2.0.2.
      jsf code:
      <h:form>
      <rich:fileUpload id="upload" fileUploadListener="#{bean.fileUploadListener}" acceptedTypes="jpg, gif, png, bmp"/>
      </h:form>

      Backing bean method is in a conversation scope backing bean. it is the following:
      public void fileUploadListener(UploadEvent event) throws IOException {
      System.out.println("file listener has been called");
      }

      web.xml contains the following:

      <filter-name>Seam Filter</filter-name>
      <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
      <init-param>
      <param-name>createTempFiles</param-name>
      <param-value>true</param-value>
      </init-param>
      <init-param>
      <param-name>maxRequestSize</param-name>
      <param-value>20000000</param-value>
      </init-param>



      In the richfaces source i could see broadcast method of UIFileUpload class does not get called in the invoke application phase with an UploadEvent paramater. This method should call the fileUploadListener as i understood that code.

      Has anyone got any idea?! Have you ever successfully used this component with seam?

      BR,
      Zoltan Verebes
      B2international, Budapest