Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple attribute on h:inputFile #1197

Closed
eclipse-faces-bot opened this issue Jun 10, 2013 · 7 comments
Closed

Support multiple attribute on h:inputFile #1197

eclipse-faces-bot opened this issue Jun 10, 2013 · 7 comments

Comments

@eclipse-faces-bot
Copy link

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 instead of just Part.

Affected Versions

[2.2]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by @edburns

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
is related to
JAVASERVERFACES_SPEC_PUBLIC-802

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Setting priority to Major

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1197

@eclipse-faces-bot
Copy link
Author

@volosied
Copy link
Contributor

volosied commented Feb 8, 2024

duplicate of #1555

closing

@volosied volosied closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants