Grokbase Groups MyFaces dev June 2016
FAQ
Bill Lucy created MYFACES-4050:
----------------------------------

              Summary: Validators not invoked for emptyselectManyCheckbox components
                  Key: MYFACES-4050
                  URL: https://issues.apache.org/jira/browse/MYFACES-4050
              Project: MyFaces Core
           Issue Type: Bug
     Affects Versions: 2.2.10
          Environment: Tomcat, WebSphere Liberty
             Reporter: Bill Lucy


Custom validators are not invoked for selectManyCheckbox component, if the component has no selections made; this can be an issue if we want to handle the null/empty case in a validator. The following context params address this case:

  <context-param>
   <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
   <param-value>true</param-value>
  </context-param>

  <context-param>
      <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
      <param-value>true</param-value>
  </context-param>

But these params do not affect the behavior here. Based on my understanding of the spec, it seems that this behavior should be changed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Search Discussions

  • Anonymous at Jun 9, 2016 at 4:13 pm
    [ https://issues.apache.org/jira/browse/MYFACES-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Bill Lucy updated MYFACES-4050:
    -------------------------------
         Status: Patch Available (was: Open)
    Validators not invoked for empty selectManyCheckbox components
    --------------------------------------------------------------

    Key: MYFACES-4050
    URL: https://issues.apache.org/jira/browse/MYFACES-4050
    Project: MyFaces Core
    Issue Type: Bug
    Affects Versions: 2.2.10
    Environment: Tomcat, WebSphere Liberty
    Reporter: Bill Lucy
    Attachments: MYFACES-4050.patch


    Custom validators are not invoked for selectManyCheckbox component, if the component has no selections made; this can be an issue if we want to handle the null/empty case in a validator. The following context params address this case:
    <context-param>
    <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
    <param-value>true</param-value>
    </context-param>

    <context-param>
    <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
    <param-value>true</param-value>
    </context-param>
    But these params do not affect the behavior here. Based on my understanding of the spec, it seems that this behavior should be changed.


    --
    This message was sent by Atlassian JIRA
    (v6.3.4#6332)
  • Anonymous at Jun 9, 2016 at 4:15 pm
    [ https://issues.apache.org/jira/browse/MYFACES-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15322783#comment-15322783 ]

    Bill Lucy commented on MYFACES-4050:
    ------------------------------------

    The fix I'm proposing here is straightforward - we're overriding UIInput.validateValue() in UISelectMany; we need to check shouldValidateEmptyFields() in the overridden method.
    Validators not invoked for empty selectManyCheckbox components
    --------------------------------------------------------------

    Key: MYFACES-4050
    URL: https://issues.apache.org/jira/browse/MYFACES-4050
    Project: MyFaces Core
    Issue Type: Bug
    Affects Versions: 2.2.10
    Environment: Tomcat, WebSphere Liberty
    Reporter: Bill Lucy
    Attachments: MYFACES-4050.patch


    Custom validators are not invoked for selectManyCheckbox component, if the component has no selections made; this can be an issue if we want to handle the null/empty case in a validator. The following context params address this case:
    <context-param>
    <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
    <param-value>true</param-value>
    </context-param>

    <context-param>
    <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
    <param-value>true</param-value>
    </context-param>
    But these params do not affect the behavior here. Based on my understanding of the spec, it seems that this behavior should be changed.


    --
    This message was sent by Atlassian JIRA
    (v6.3.4#6332)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesmyfaces
postedJun 9, '16 at 4:05p
activeJun 9, '16 at 4:15p
posts3
users1
websitemyfaces.apache.org

1 user in discussion

Anonymous: 3 posts

People

Translate

site design / logo © 2019 Grokbase