2 Replies Latest reply on May 25, 2010 6:25 AM by Nick Belaevski

    RF 3.3.1 - rich:fileUpload - no listener called + submit instead of ajax call

    ?ukasz Wachowicz Newbie

      Hi there,


      I have a problem using rich:fileUpload component. I can't get it to work properly. I want to place fileUpload in rich:modalPanel. Generally it works, but server side processing does not.


      when i do "Upload" whole page is being refreshed (instead of sending Ajax request) and fileUploadListener is not called. I tried the following:


      <h:panelGroup id="emptyPanelPreventsPageReload" />
          <rich:fileUpload fileUploadListener="#{browserDataBinder.listener}" acceptedTypes="png" maxFilesQuantity="1" listHeight="150">
              <a4j:support event="onuploadcomplete" reRender="emptyPanelPreventsPageReload" />


      or simply:


          <rich:fileUpload fileUploadListener="#{browserDataBinder.listener}" acceptedTypes="png" maxFilesQuantity="1" listHeight="150" />

      My Java side looks like:


      public class BrowserDataBinder {

           public void listener(UploadEvent event) throws Exception {
              UploadItem uploadedItem = event.getUploadItem();




      web.xml has two following rich entries


          <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 have Ajax in many other places in my application. It simply works. This is the first time i have problems with rich faces.


      Maybe some of you had similar issues. I didn't find anything on the internet. Thanks in advance for any hints ...