3 Replies Latest reply on Jun 11, 2008 5:53 PM by Fab Mars

    Upload with several fileUpload on a page fire all listeners

    Fab Mars Novice


      My settings are RF 3.2.1, JSF RI 1.2.09b1, Facelets 1.1.14, GlassfishV2, and my fileUpload setting is createTempFiles = true.

      I have some page with 2 fileUpload components on my page. When I upload osome file (with or without immediate upload), both listeners for both components are fired. The one for which a file was actually uploaded is all correct, whereas the other one which shouldn't be fired, is given with an UploadItem whose all properties are null.

      Here's a stripped down version of my page. There is some machinery behind to show the user some thumb of uploaded files and additional buttons to delete already uploaded stuff.

      <a4j:keepAlive beanName="releaseEdit"/>
      <h:form id="releaseEditForm">
       <h:panelGrid columns="2" width="100%">
       <h:outputLabel for="cover" value="Cover" styleClass="required"/>
       <h:panelGrid id="cover">
       <rich:fileUpload fileUploadListener="#{releaseEdit.coverUploadListener}" acceptedTypes="jpg, gif, png">
       <a4j:support event="onuploadcomplete" reRender="cover" />
       <h:panelGroup rendered="#{releaseEdit.coverPath != null}">
       <h:graphicImage value="#{releaseEdit.coverPath}"/>
       <a4j:commandButton actionListener="#{releaseEdit.doDeleteCover}" value="Del" reRender="cover" ajaxSingle="true"/>
       <h:outputLabel for="sheet" value="Sales sheet"/>
       <h:panelGrid id="sheet">
       <rich:fileUpload fileUploadListener="#{releaseEdit.salesSheetUploadListener}" acceptedTypes="doc, pdf">
       <a4j:support event="onuploadcomplete" reRender="sheet"/>
       <h:panelGroup rendered="#{releaseEdit.salesSheetPath != null}">
       <h:outputLink value="#{releaseEdit.salesSheetPath}"/>
       <a4j:commandButton actionListener="#{releaseEdit.doDeleteSalesSheet}" value="Del" reRender="sheet" ajaxSingle="true"/>

      Can you conform there is a bug ?