ICEfaces
  1. ICEfaces
  2. ICE-2927

selectInputDate "required" attribute not working

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      The "required" attribute is not working correctly with the selectInputDate component. There was an earlier issue where no validators were working at all that was resolved (ICE-1748), however, no the required attribute is non-functional.

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          This is a somewhat complex requirement in that the selectInputDate component is comprised of two components itself, the inputText and the button. It's complex/difficult to manage the state to know when a user leaves the inputText that he's just going to the button, so maybe don't enforce the required attribute for that, but if he is going to another element on the page then do enforce it.

          The simplest thing is probably to have the required attribute enforced all the time, so if the user just tabs through the inputText on their way to the button, the required test will fail and the msg associated with it will be displayed. This might be acceptable, if a little annoying if you're just trying to use the popup to enter the value and it's already complaining / warning that you need to enter the value.

          Show
          Ken Fyten added a comment - This is a somewhat complex requirement in that the selectInputDate component is comprised of two components itself, the inputText and the button. It's complex/difficult to manage the state to know when a user leaves the inputText that he's just going to the button, so maybe don't enforce the required attribute for that, but if he is going to another element on the page then do enforce it. The simplest thing is probably to have the required attribute enforced all the time, so if the user just tabs through the inputText on their way to the button, the required test will fail and the msg associated with it will be displayed. This might be acceptable, if a little annoying if you're just trying to use the popup to enter the value and it's already complaining / warning that you need to enter the value.
          Hide
          Mark Collette added a comment -

          Now, with required="true", if you clear the text field and TAB out of it, or press ENTER, it will fail validation. Also, if you do a full form submit, it will now fail validation. But, clicking on the button to popup or hide the calendar, or changing the month or year with the arrow buttons or the menus, will not cause validation to occur.

          TRUNK
          Subversion 17151
          ICEfaces 1.7 branch
          Subversion 17152
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
          icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java

          Show
          Mark Collette added a comment - Now, with required="true", if you clear the text field and TAB out of it, or press ENTER, it will fail validation. Also, if you do a full form submit, it will now fail validation. But, clicking on the button to popup or hide the calendar, or changing the month or year with the arrow buttons or the menus, will not cause validation to occur. TRUNK Subversion 17151 ICEfaces 1.7 branch Subversion 17152 icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java
          Hide
          Mark Collette added a comment -

          ICEfaces 1.7.1 branch
          Subversion 17170
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
          icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java

          Show
          Mark Collette added a comment - ICEfaces 1.7.1 branch Subversion 17170 icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java
          Hide
          Mark Collette added a comment -

          Fixed the

          { next month, prev month, next year, prev year }

          issue. It was fallout from changing some of the ids, necessary for making required work properly.

          TRUNK
          Subversion 17182
          ICEfaces 1.7 branch
          Subversion 17184
          ICEfaces 1.7.1 branch
          Subversion 17183
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java

          Show
          Mark Collette added a comment - Fixed the { next month, prev month, next year, prev year } issue. It was fallout from changing some of the ids, necessary for making required work properly. TRUNK Subversion 17182 ICEfaces 1.7 branch Subversion 17184 ICEfaces 1.7.1 branch Subversion 17183 icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
          Hide
          Mark Collette added a comment -

          Made required apply to the non-popup calendar. Since it doesn't have a text input field always being submitted, I gave it a hidden input field.

          TRUNK
          Subversion 17187
          ICEfaces 1.7 branch
          Subversion 17188
          ICEfaces 1.7.1 branch
          Subversion 17189
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java

          Show
          Mark Collette added a comment - Made required apply to the non-popup calendar. Since it doesn't have a text input field always being submitted, I gave it a hidden input field. TRUNK Subversion 17187 ICEfaces 1.7 branch Subversion 17188 ICEfaces 1.7.1 branch Subversion 17189 icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
          Hide
          Stuart Campbell added a comment -

          required="true" isn't honoured when the popup is open. When a page is loaded, if the popup is opened, then a submit occurs, it will just submit null without complaint.

          Show
          Stuart Campbell added a comment - required="true" isn't honoured when the popup is open. When a page is loaded, if the popup is opened, then a submit occurs, it will just submit null without complaint.
          Hide
          Ken Fyten added a comment -

          Created new JIRA (ICE-4827) for this follow-on issue.

          Show
          Ken Fyten added a comment - Created new JIRA ( ICE-4827 ) for this follow-on issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ken Fyten
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: