1 Reply Latest reply on Nov 3, 2008 6:01 AM by Andrei Markavtsov

    Fileupload is not refreshing view when providing an action

    Maciej Bednarz Newbie

      Hi,

      im am trying to provide an upload which immediatly after completion redirects to an other view. So far everythin is working fine, but the next view is not shown immediately after upload but only after I refresh the whole jsp page. Could some one have a view on my code and give me a hint how to correct so that after an upload the view is changing ?

      <h:form>
       <rich:fileUpload
       fileUploadListener="#{fileUploadBean.listener}"
       maxFilesQuantity="1"
       id="upload"
       immediateUpload="true"
       acceptedTypes="jpg, gif, png, bmp">
       <a4j:support event="onuploadcomplete" action="page_success"/>
       </rich:fileUpload>
      </h:form>
      


      Thank you very much,

      Maciej

        • 1. Re: Fileupload is not refreshing view when providing an acti
          Andrei Markavtsov Apprentice

          Hi,

          It works fine for me on 3.2.2.GA.

          What RF version do use use?

          My code:

          jsp:

          <h:form>
           <rich:fileUpload
           fileUploadListener="#{bean.upload}"
           maxFilesQuantity="1"
           id="upload"
           immediateUpload="true"
           acceptedTypes="*">
           <a4j:support event="onuploadcomplete" action="page_success"/>
           </rich:fileUpload>
          </h:form>


          Faces-config:

          ...
          <navigation-case>
           <from-outcome>page_success</from-outcome>
           <to-view-id>/faces/pages/fileUpload.xhtml</to-view-id>
           <redirect/>
           </navigation-case>
          ...