javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2923

required attribute is not enforced for inputFile

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      glassfish 4.0, Firefox

      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.

      1. changebundle.txt
        5 kB
        Manfred Riem
      2. changebundle.txt
        10 kB
        Manfred Riem

        Issue Links

          Activity

          Hide
          Manfred Riem added a comment -

          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.

          Show
          Manfred Riem added a comment - 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.
          Hide
          Manfred Riem added a comment -

          Investigate problem with Tomcat

          Show
          Manfred Riem added a comment - Investigate problem with Tomcat
          Hide
          Manfred Riem added a comment -

          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.

          Show
          Manfred Riem added a comment - 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.

            People

            • Assignee:
              Manfred Riem
              Reporter:
              jasonzhang2002gmailcom
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: