4 Replies Latest reply on Mar 24, 2009 7:34 AM by ilya_shaikovsky

    rich:faces file upload

      hi, i am using rich:fileUpload for loading file and i am using Tamcat server. ISSUE: While uploading file i am using fileUploadListener to parse that file.After execution of this listener i need to render that file name on my page seperatly.But this is not happen when uploading file first time after tamcat started..If i try again the same file it will upload successfully.Suppose the file big one it will take two to three times to upload. For this whether i need to do anything web.xml regarding file size and all.. using richfaces 3.3.0 Please can any one help me.

        • 1. Re: rich:faces file upload

           

          "jayaganesh13" wrote:
          hi, i am using rich:fileUpload for loading file and i am using Tamcat server.

          While uploading file i am using fileUploadListener to parse that file.After execution of this listener i need to render that file name on my page seperatly.But this is not happen when uploading file first time after tamcat started..If i try again the same file it will upload successfully.Suppose the file big one it will take two to three times to upload.

          <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
          maxFilesQuantity="1"
          id="upload"
          immediateUpload="false"
          acceptedTypes="txt,csv" >
          <a4j:support event="onuploadcomplete" reRender="info" />
          </rich:fileUpload>
          <h:outputText value="#{uploader.fileName}" id="info" styleClass="wizard" style="font-size:10px"/>

          http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=fileUpload&tab=usage

          please refer above link i did same thing, but first time have problem with uploading.

          So, to upload one file i need to do couple of times upload.Wt is the problem with this...i am using richfaces 3.3.0.
          Please can any one help me.


          • 2. Re: rich:faces file upload
            nbelaevski

            Hello,

            Sorry, can you please clarify your question?

            • 3. Re: rich:faces file upload

              The event i mentioned (ie,onuploadcomplete) will not fire when first time uploading file..so i'm not able to reRender the component i mentioned (ie,info)...

              Wt is wrong in this code?

              • 4. Re: rich:faces file upload
                ilya_shaikovsky

                Please use a4j:log in order to check if the oncomplete actually rises the next request and which problems are risen during it.
                Also check please phaseTracker logs for the request called by oncomplete.

                Yes, I could not confirm this currently actually because the same code used at our demo and as you could see preview called every time upload occurs.