7 Replies Latest reply: Mar 4, 2013 8:38 AM by ankurmdh RSS

    Uploading a File Behaviour

    ankurmdh
      Hi All,

      Jdev Version 11.1.16.0

      We have af:inputFile and af:inputDate and af:inputText and Submit button in Popup.

      We are using af:inputFile to upload file to mount path on server and everything is working fine. But when I selected 350 MB file in Chrome, I saw that chrome started showing Uploading % at bottom of browser as soon as I selected the file and move to next component to select Date.
      My logic to stream file and write to file server location is handle on Submit Button action listener. Is this Uploading % indicate file temporary being stored in MEMORY? Please suggest.

      Thanks
      Ankur
        • 1. Re: Uploading a File Behaviour
          ankurmdh
          Also, In my web.xml we have following configuration, is this Upload % indication is due to this configuration.

          <context-param>
          <description>Max size of a file that will be uploaded in ram (1MB)</description>
          <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
          <param-value>1048576</param-value>
          </context-param>
          <context-param>

          Ankur
          • 2. Re: Uploading a File Behaviour
            Timo Hahn
            When you see the Uploading % in the status bar of the browser it means that the download has started. You can't decide if hte upload is done in memory or in a temporary file.
            I made a test with on a normal page and did not see the upload % before I clicked the submit button.
            So this behavior might have something to do with the popup.
            Have you checked that you don't have a ppr which triggers the upload?
            Can you try the upload on the page (not on the popup)?

            Timo
            • 3. Re: Uploading a File Behaviour
              ankurmdh
              Hi Timo,

              In our popup, inputDate and other selectOneChoice is PPR, which I think is causing the form to save the selected file in memory which in turn causing performance hit for calender load time or SelectOneChoice enabling.
              We have only one form which is on top encapsulating every element in the page.

              What can be solution? Should we remove all PPR from Popup, the how should we use Date and SelectOneChoice component within popup? We have to use Popup for File Upload.

              Thanks
              Ankur
              • 4. Re: Uploading a File Behaviour
                Timo Hahn
                Yes, the ppr is populated to all components in hte same naming container.
                What you can do is to put the fileupload in a subform which will be a new naming container.

                Timo
                • 5. Re: Uploading a File Behaviour
                  ankurmdh
                  Hi Timo,

                  We have jsff page, which is being used as region in a jspx page(this page af:form id="f1" usesUpload="true").

                  I used below code in our jsff page, but didn't worked out.

                  1.
                  <af:subform id="s43">
                  <af:inputFile label="#{sprportalBundle.DAM_SELECT_FILE}"
                  id="if1"
                  value="#{pageFlowScope.downloadPatchBean.patchFile}"
                  styleClass="browsetype" required="true"/>
                  </af:subform>

                  2. If I add a new form in jsff page, we get error <FormRenderer> <encodeAll> Multiple forms detected on viewId: /oracle/webcenter/portalapp/pages/xyz.jspx. Rich client currently has some limitations in dealing with multiple forms.

                  Any other approach, which we can take.

                  Ankur
                  • 6. Re: Uploading a File Behaviour
                    ankurmdh
                    Also tried to add subform to other component inputDate but didn't worked

                    <af:form id="f1" usesUpload="true">
                    <af:inputFile label="#{sprportalBundle.DAM_SELECT_FILE}"
                    id="if1"
                    value="#{pageFlowScope.downloadPatchBean.patchFile}"
                    styleClass="browsetype" required="true"/>
                    <af:subform default="false">
                    <af:inputDate label="Label 1" id="id1" />
                    </af:subform>
                    </af:form>
                    • 7. Re: Uploading a File Behaviour
                      ankurmdh
                      Even tried. Datepicker jquery widget. It worked for normal page level textbox but did not work in inputText within popup.

                      Ankur