Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Components/Renderers
    • Labels:
      None

      Description

      HTML 5 has a new attribute on input file: multiple.

      When present, the user agent must allow the file chooser to select multiple files.

      While the pass through attributes feature allows this to render correctly:

      <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>
      ...
      

      The renderer for javax.faces.Input javax.faces.File doesn't handle this case correctly.

      Instead, as it iterates through the parts, it just overwrites the preceding part with each file in the uploaded collection.

      I think a better strategy is to always have the value of the component be a List<Part> instead of just Part.

        Issue Links

          Activity

          Ed Burns created issue -
          Ed Burns made changes -
          Field Original Value New Value
          Link This issue is related to JAVASERVERFACES_SPEC_PUBLIC-802 [ JAVASERVERFACES_SPEC_PUBLIC-802 ]
          Ed Burns made changes -
          Assignee rogerk [ rogerk ]
          Ed Burns made changes -
          Priority Minor [ 4 ] Trivial [ 5 ]
          Manfred Riem made changes -
          Priority Trivial [ 5 ] Major [ 3 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Ed Burns
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 3 days
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified