Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: Ajax/JavaScript
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      802
    • Status Whiteboard:
      Hide

      size_medium importance_large draft

      Show
      size_medium importance_large draft
    • Tags:

      Description

      The main issue with the current implementation is, that fileupload the ajax way
      is not working properly.

      The problem simply is, that fileupload component and multipart form requests
      both are a second class citizen in the JEE world and html generally.
      There is no way to submit a fileupload via ajax currently, however there is an
      iframe based method to do it.

      But for that an iframe transport layer is missing, since the current spec only
      talks abut queued asynchronous xhr requests.

      see http://www.openjs.com/articles/ajax/ajax_file_upload/

      for more information....

      1. 20121102-werpu-AjaxFileupload.odt
        16 kB
        Ed Burns
      2. 20111208-i_spec_802-mods.patch
        84 kB
        Ed Burns
      3. 20110613-i_spec_802_mods.txt
        3 kB
        Ed Burns

        Issue Links

          Activity

          Hide
          arjan tijms added a comment -

          As JSF 2.2 went final, shouldn't this issue be closed?

          Show
          arjan tijms added a comment - As JSF 2.2 went final, shouldn't this issue be closed?
          Hide
          rogerk added a comment -

          Fixed for 2.2

          Show
          rogerk added a comment - Fixed for 2.2
          Hide
          jid1 added a comment -

          Did the "multiple" attribute make it into the spec?

          Show
          jid1 added a comment - Did the "multiple" attribute make it into the spec?
          Hide
          Ed Burns added a comment -

          Well, yes and no. I just tested it.

          Here's the yes part.

          You can say this:

          <html xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:p="http://xmlns.jcp.org/jsf/passthrough">
              <h:head></h:head>
          
              <h:form id="form" enctype="multipart/form-data" prependId="false">
                  
                  <p><h:inputFile id="file" value="#{fileUploadBean.uploadedFile}" p:multiple="multiple"> 
                       <f:validator validatorId="FileValidator" />
                     </h:inputFile>
                  </p>
          ...
          

          and it renders correctly:

                  <p><input id="file" type="file" name="file" multiple="multiple" />
          

          but the no part is that each of the files in the multiple list is overwritten when the next one is processed.

          Show
          Ed Burns added a comment - Well, yes and no. I just tested it. Here's the yes part. You can say this: <html xmlns= "http: //www.w3.org/1999/xhtml" xmlns:ui= "http: //xmlns.jcp.org/jsf/facelets" xmlns:f= "http: //xmlns.jcp.org/jsf/core" xmlns:h= "http: //xmlns.jcp.org/jsf/html" xmlns:p= "http: //xmlns.jcp.org/jsf/passthrough" > <h:head></h:head> <h:form id= "form" enctype= "multipart/form-data" prependId= " false " > <p><h:inputFile id= "file" value= "#{fileUploadBean.uploadedFile}" p:multiple= "multiple" > <f:validator validatorId= "FileValidator" /> </h:inputFile> </p> ... and it renders correctly: <p><input id= "file" type= "file" name= "file" multiple= "multiple" /> but the no part is that each of the files in the multiple list is overwritten when the next one is processed.
          Hide
          Ed Burns added a comment -

          I have filed < https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1197 > to cover this. We'll get to it in 2.3.

          Show
          Ed Burns added a comment - I have filed < https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1197 > to cover this. We'll get to it in 2.3.

            People

            • Assignee:
              Ed Burns
              Reporter:
              werpu12
            • Votes:
              10 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 week
                1w
                Remaining:
                Time Spent - 15 hours, 57 minutes Remaining Estimate - 6 days, 8 hours, 3 minutes
                6d 8h 3m
                Logged:
                Time Spent - 15 hours, 57 minutes Remaining Estimate - 6 days, 8 hours, 3 minutes
                15h 57m