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

          Hide
          Manfred Riem added a comment -

          Setting priority to Major

          Show
          Manfred Riem added a comment - Setting priority to Major
          Hide
          Ed Burns added a comment -

          Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

          Show
          Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ed Burns
            • Votes:
              2 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