ICEfaces
  1. ICEfaces
  2. ICE-9881

File upload with h:inputFile fails if using icefaces jars

    Details

    • Assignee Priority:
      P1

      Description

      A JS error occurs in FF/IE when uploading files using the h:inputFile component; in Firefox27 the file seems to be uploaded (although the JS error is visible in the console); in Chrome32 or IE10 the file does not appear to be uploaded, and its length is not rendered on page.
      The error message in FF27:
      TypeError: e is undefined
      http://localhost:8080/ICE-9440/javax.faces.resource/bridge.js.jsf?ln=ice.core&v=4_0_0_140224
      Line 32

      These issues can be reproduced using the test app from: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/ICE-9440
      If removing the icefaces.jar and icefaces-ace.jar from the ICE-9440.war file, the file upload on the demo page without ACE components (/simple.jsf) will pass in all browsers and no JS errors will occur.

      Steps:
      - build the app, deploy to Tomcat7 (ant clean servlet-profile); this will include all icefaces jars into the war file.
      - go to: http://localhost:8080/ICE-9440/start.jsf, then select any h:inputFile demo page.
      - browse for any type of file with a size <= 500K, and click "upload".
      - if testing in FF27, the length of the uploaded file will be rendered on page, but a JS error will be seen in browser console; if testing in Chrome, no file length will be rendered on page, and no JS error will be seen. In IE10, no length will be rendered on page and the JS error will occur.
      - stop the server, remove icefaces.jar, icefaces-ace.jar, icefaces-mobi.jar from the war file and repeat the upload test on the /simple.jsf demo page. No issues will be seen in any of the browsers.

        Activity

        Hide
        Mircea Toma added a comment -

        The problem is caused by our form submit capturing. For "multipart/form-data" forms JSF will pass back the control to our fullSubmit function who fails to serialise properly the form.

        ice.captureSubmit was changed to avoid hijacking the submit for forms that have "multipart/form-data" as encoding type attribute.

        Show
        Mircea Toma added a comment - The problem is caused by our form submit capturing. For "multipart/form-data" forms JSF will pass back the control to our fullSubmit function who fails to serialise properly the form. ice.captureSubmit was changed to avoid hijacking the submit for forms that have "multipart/form-data" as encoding type attribute.
        Hide
        Mircea Toma added a comment -

        Back-ported fix.

        Show
        Mircea Toma added a comment - Back-ported fix.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: