4 Replies Latest reply on Jan 9, 2009 2:23 PM by ilya_shaikovsky

    no reRender after rich:fileUpload

      hi,
      i'm trying to force a reRender after a file has been uploaded with rich:fileUpload. On other places where i used this component it worked as expected but not in the following scenario:

      <rich:fileUpload id="upload" autoclear="true" maxFilesQuantity="4"
       fileUploadListener="#{Bean.uploaded}" acceptedTypes="csv,txt"
       listHeight="0" >
       <a4j:support event="onuploadcomplete" reRender="fileName" />
       <a4j:support event="ontyperejected" actionListener="#{Bean.indicateWrongFormat}" />
      </rich:fileUpload>
      <h:outputFormat value="#{msg.fileName}" styleClass="labelStyleSmall" />
      <a4j:outputPanel id="fileName" layout="block" >
       <h:outputText value="#{Bean.fileName}" rendered="#{Bean.fileAvailable}"/>
       <h:outputText value="#{msg.noFileUploaded}" styleClass="noFileUploaded"
       rendered="#{!Bean.fileAvailable}"/>
      </a4j:outputPanel>
      


      i already checked the a4j:log but couldn't find anything remarkable.
      any ideas?

        • 1. Re: no reRender after rich:fileUpload

          fixed it. it was an issue with the bean naming. strangely no errors/warnings were display...

          • 2. Re: no reRender after rich:fileUpload

            I'm having the same problem as you mentioned above. trying to reRender component with "successMessage" I have set with a boolean value from the backing bean, but component never renders after file uploaded.

            <a4j:outputPanel id="successMessage" ajaxRendered="true"> <h:panelGrid border="1" rendered="#{userRegistrationBean.successRegistration}">
             <h:outputText value="registration successful!" style="color:blue"/>
             </h:panelGrid>
             </a4j:outputPanel>


            • 3. Re: no reRender after rich:fileUpload

              sorry complete code is here

              <a4j:outputPanel id="successMessage" ajaxRendered="true">
               <h:panelGrid border="1" rendered="#{userRegistrationBean.successRegistration}">
               h:outputText value="registration successful!" style="color:blue"/> </h:panelGrid>
              </a4j:outputPanel>
              
               <h:panelGrid id="fileUploadGrid" rendered="#{userRegistrationBean.showFileuploadGrid}">
               <rich:fileUpload id="photoUpload" maxFilesQuantity="1" listWidth="800px" fileUploadListener="#{userRegistrationBean.listener}">
               <a4j:support event="onuploadcomplete" reRender="successMessage"/>
               </rich:fileUpload> </h:panelGrid>


              • 4. Re: no reRender after rich:fileUpload
                ilya_shaikovsky

                What is the scope of userRegistrationBean? (should be session or keepalive used for ajax requests for this bean)


                If there are some problems inside a4j:log?