5 Replies Latest reply on Jul 6, 2010 10:05 AM by Raul Valentini

    File Upload: unable to catch UploadEvent

    Raul Valentini Newbie


      I'm new in richfaces, and I'm trying to implement a simple page with a file upload.

      I've tried to use the source code of the example from richfaces live demo, but I've noticed he is using a seam listener.

      I don't want to use seam or other frameworks, but without that, at the end of the uploading file process, seems that no listener is listening to the UploadEvent.

      Indeed the method associated with the fileUploadListener attribute on the rich:fileupload component is never called.


      This is the code of my jsp (pasted from the live demo):


      <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
                      acceptedTypes="jpg, gif, png, bmp" allowFlash="#{fileUploadBean.useFlash}">
                      <a4j:support event="onuploadcomplete" reRender="info" />


      the method fileUploadBean.listener(UploadEvent event) is never called.

      This is my entire web.xml with a "ConfigureListener"... Must I declare another listener in the web.xml?


         <!-- Plugging the "Blue Sky" skin into the project -->
         <!-- Making the RichFaces skin spread to standard HTML controls -->
         <!-- Defining and mapping the RichFaces filter -->
            <display-name>RichFaces Filter</display-name>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-name>Faces Servlet</servlet-name>


      I'm using jsf with richfaces 2.0, eclipse and tomcat 6.0.

      I hope I mustn't use seam.


      Thank you in advance for any tip!