ICEfaces
  1. ICEfaces
  2. ICE-3922

custom validator not fired for selectInputDate when value entered is invalid

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7.2 SP1
    • Fix Version/s: 1.8RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      ANY
    • Assignee Priority:
      P2

      Description

      custom validator is not fired for selectInputDate when value entered is invalid
      user may want to perform some extra steps during the validation process other than display the error message
      for example, a customer wants to have a popup showing the validation error.

        Activity

        Hide
        Sam Xiao added a comment -

        test case for tomcat 6

        Show
        Sam Xiao added a comment - test case for tomcat 6
        Hide
        Mark Collette added a comment -

        What are they trying to control? Do they want to be notified of failed validation, so they can make their popup show if there are FacesMessages? They can already do that with <ice:panelPopup rendered="#

        {! empty facesContext.maximumSeverity}

        ">

        Do they want to specify the FacesMessage string? That's accomplished by setting the validationMessage and converterMessage attributes on the selectInputDate component (in JSF 1.2).

        Do they want to change the criteria of the date conversion? Maybe the SimpleDateFormat matching has a bug? Then they must create a class that extends javax.faces.convert.DateTimeConverter, and specify that as the selectInputDate's converter.

        Show
        Mark Collette added a comment - What are they trying to control? Do they want to be notified of failed validation, so they can make their popup show if there are FacesMessages? They can already do that with <ice:panelPopup rendered="# {! empty facesContext.maximumSeverity} "> Do they want to specify the FacesMessage string? That's accomplished by setting the validationMessage and converterMessage attributes on the selectInputDate component (in JSF 1.2). Do they want to change the criteria of the date conversion? Maybe the SimpleDateFormat matching has a bug? Then they must create a class that extends javax.faces.convert.DateTimeConverter, and specify that as the selectInputDate's converter.
        Hide
        Mark Collette added a comment -

        For UIInput subclasses, validation has a non-intuitive quirk: required and validator processing are mutually exclusive. That is, if a submitted value is "empty", then required will be checked. And if the submitted value is "not empty" then the validator will be checked. So, empty submitted values will not be validated against the validator, only against required.

        Furthermore, from the test case, there would not be a Date with zeros for the year, month and day. That would cause a converter error, and would not get to the validator.

        Show
        Mark Collette added a comment - For UIInput subclasses, validation has a non-intuitive quirk: required and validator processing are mutually exclusive. That is, if a submitted value is "empty", then required will be checked. And if the submitted value is "not empty" then the validator will be checked. So, empty submitted values will not be validated against the validator, only against required. Furthermore, from the test case, there would not be a Date with zeros for the year, month and day. That would cause a converter error, and would not get to the validator.

          People

          • Assignee:
            Mark Collette
            Reporter:
            Sam Xiao
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: