[JAVASERVERFACES-2923] required attribute is not enforced for inputFile Created: 09/Jul/13  Updated: 17/Jul/13  Resolved: 17/Jul/13

Status: Closed
Project: javaserverfaces
Component/s: None
Affects Version/s: 2.2.0, 2.2.1
Fix Version/s: 2.2.2

Type: Bug Priority: Major
Reporter: jasonzhang2002gmailcom Assignee: Manfred Riem
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

glassfish 4.0, Firefox


Attachments: Text File changebundle.txt     Text File changebundle.txt     Zip Archive newfiles.zip    
Issue Links:
Related
is related to JAVASERVERFACES_SPEC_PUBLIC-1206 required attribute is not enforced fo... Open
Tags: file, file_upload, require

 Description   

When I select file at browser or not, I always have a part at server side. If no file is selected, the Part.size is zero.



 Comments   
Comment by Manfred Riem [ 10/Jul/13 ]

Applied to 2.2 branch,

svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2923, r=rogerk, make sure the required attribute on h:inputFile works"
Sending jsf-ri\src\main\java\com\sun\faces\renderkit\html_basic\FileRenderer.java
Deleting test\agnostic\facelets\html\nb-configuration.xml
Sending test\agnostic\facelets\html\pom.xml
Adding test\agnostic\facelets\html\src\main\resources
Adding test\agnostic\facelets\html\src\main\webapp\inputFileRequired.xhtml
Adding test\agnostic\facelets\html\src\test\java\com\sun\faces\test\agnostic\facelets\html\Issue2923IT.java
Transmitting file data ....
Committed revision 12080.

Comment by Manfred Riem [ 15/Jul/13 ]

Investigate problem with Tomcat

Comment by Manfred Riem [ 17/Jul/13 ]

Applied to 2.2 branch,

svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2923, make sure the test does not rely on CDI"
Sending test\agnostic\facelets\html\src\main\java\com\sun\faces\test\agnostic\facelets\html\FileUploadBean.java
Deleting test\agnostic\facelets\html\src\main\webapp\WEB-INF\beans.xml
Sending test\agnostic\facelets\html\src\main\webapp\inputFileRequired.xhtml
Transmitting file data ..
Committed revision 12112.

Generated at Sun Dec 04 03:35:00 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.