ICEfaces
  1. ICEfaces
  2. ICE-4584

Date value not being set for selectInputDate with time

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When the selectInputDate is set to allow time being set it does not close/set the date when a date is chosen. This is due to the fact that the time needs to be set also. The issue is that when if a user opens the calendar popup, selects a date and then clicks on a commandButton that submits the form the date value in the backing bean is not set until the submit action/actionListener is finished.

        Activity

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case8296Example.war [ 11788 ]
        Arran Mccullough made changes -
        Attachment Case8296Example.zip [ 11789 ]
        Arran Mccullough made changes -
        Salesforce Case [50070000008nOaG]
        Arran Mccullough made changes -
        Assignee Ken Fyten [ ken.fyten ]
        Hide
        Ken Fyten added a comment -

        This is the expected behavior of the component. Since we don't want the component to be firing value-change events for every selection change on a sub-section of the total date+time entry, we wait until the user has completed entering all the fields and confirms their entry by closing the popup (by clicking off the popup or clicking the "X" button) to submit the changed entry.

        It might be clearer if we added a set of "OK / Cancel" buttons to the popup (or check + "X") so the user sees they need to confirm the entry, although they will quickly learn the correct behavior when they use it.

        Show
        Ken Fyten added a comment - This is the expected behavior of the component. Since we don't want the component to be firing value-change events for every selection change on a sub-section of the total date+time entry, we wait until the user has completed entering all the fields and confirms their entry by closing the popup (by clicking off the popup or clicking the "X" button) to submit the changed entry. It might be clearer if we added a set of "OK / Cancel" buttons to the popup (or check + "X") so the user sees they need to confirm the entry, although they will quickly learn the correct behavior when they use it.
        Hide
        Ken Fyten added a comment -

        After reviewing the customer's requirements and the general working of the ice:selectInputDate component it seems we need to make the following changes to avoid user-confusion when using this component to enter both dates and times:

        1. Modify the component so that the inputText field associated with it doesn't update it's values as the user selects items in the popup. The inputText field should only be updated once the user closes the popup (and the edited/selected value is applied). This avoids confusion that can occur when the user sees the date and time values changing dynamically in the inputText field as they make selections, and then submit the form without first closing the calendar popup (and applying the changed values), thinking the updated values will be applied, but they are not (at least not prior to the initial submit).

        2. Add a new attribute called "showApplyButton" (boolean, default=false) to the component. When "showApplyButton=false" (default), the popup behavior is the same as it is now such that clicking anywhere off the popup, or clicking the "X" button will both close the popup and apply the selected date-time value. Similarly, when "showApplyButton=true" a button appears at the bottom of the popup with the "Apply" label (from the resources file, of course). When the user clicks the apply button, it closes the popup and applies the selected value (the same action that clicking the "X" button to hide the popup, or clicking anywhere off the popup does now). However, when "showApplyButton=true" the popup should not close automatically when the user clicks off of it, and closing it by clicking the "X" icon should close the popup and not apply the edited value (cancels the edits).

        Note that the behaviors exhibited by these additional component modalities must be described adequately in the component documentation.

        Show
        Ken Fyten added a comment - After reviewing the customer's requirements and the general working of the ice:selectInputDate component it seems we need to make the following changes to avoid user-confusion when using this component to enter both dates and times: 1. Modify the component so that the inputText field associated with it doesn't update it's values as the user selects items in the popup. The inputText field should only be updated once the user closes the popup (and the edited/selected value is applied). This avoids confusion that can occur when the user sees the date and time values changing dynamically in the inputText field as they make selections, and then submit the form without first closing the calendar popup (and applying the changed values), thinking the updated values will be applied, but they are not (at least not prior to the initial submit). 2. Add a new attribute called "showApplyButton" (boolean, default=false) to the component. When "showApplyButton=false" (default), the popup behavior is the same as it is now such that clicking anywhere off the popup, or clicking the "X" button will both close the popup and apply the selected date-time value. Similarly, when "showApplyButton=true" a button appears at the bottom of the popup with the "Apply" label (from the resources file, of course). When the user clicks the apply button, it closes the popup and applies the selected value (the same action that clicking the "X" button to hide the popup, or clicking anywhere off the popup does now). However, when "showApplyButton=true" the popup should not close automatically when the user clicks off of it, and closing it by clicking the "X" icon should close the popup and not apply the edited value (cancels the edits). Note that the behaviors exhibited by these additional component modalities must be described adequately in the component documentation.
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Yip Ng [ yip.ng ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2 [ 10190 ]
        Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration]
        Assignee Priority P2
        Ken Fyten made changes -
        Link This issue depends on ICE-4828 [ ICE-4828 ]
        Hide
        Ken Fyten added a comment -

        Created new JIRA for #1 above: ICE-4828.

        Show
        Ken Fyten added a comment - Created new JIRA for #1 above: ICE-4828 .
        Ken Fyten made changes -
        Link This issue depends on ICE-4829 [ ICE-4829 ]
        Hide
        Ken Fyten added a comment -

        Created new JIRA for #2 above: ICE-4829.

        Show
        Ken Fyten added a comment - Created new JIRA for #2 above: ICE-4829 .
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19153 Wed Aug 12 09:59:17 MDT 2009 yip.ng ICE-4584: Changed docuemnt event to close calendar popup from onclick to onmousedown. (To allow submit by a submit button.)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/calendar.js
        Hide
        Ken Fyten added a comment -

        If you change the selectInputDate JavaScript to close the popup onMouseDown instead of onClick it should fire BEFORE the button onClick does, thus resolving the issue.

        Show
        Ken Fyten added a comment - If you change the selectInputDate JavaScript to close the popup onMouseDown instead of onClick it should fire BEFORE the button onClick does, thus resolving the issue.
        yip.ng made changes -
        Attachment screenshot-1.jpg [ 11916 ]
        Hide
        yip.ng added a comment -

        It worked!

        How to test:

        Run the example. Select a date and click on the submit button. Look at the log output (see screenshot-1). The "Date Value:" should be the just-submitted date, not null or some previously submitted date.

        ("Comp Date:" is from getSubmittedValue(), which is always null because by that time the submitted value is already reinitialized to null.)

        Show
        yip.ng added a comment - It worked! How to test: Run the example. Select a date and click on the submit button. Look at the log output (see screenshot-1). The "Date Value:" should be the just-submitted date, not null or some previously submitted date. ("Comp Date:" is from getSubmittedValue(), which is always null because by that time the submitted value is already reinitialized to null.)
        Ken Fyten made changes -
        Link This issue depends on ICE-4828 [ ICE-4828 ]
        Ken Fyten made changes -
        Link This issue depends on ICE-4829 [ ICE-4829 ]
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Joanne Bai added a comment -

        Verified with success on trunk revision 19164

        Tested on: Tomcat6.0, FF3.5 and IE7

        Test app committed to repo\qa\trunk\Regression\ICE-4584

        Show
        Joanne Bai added a comment - Verified with success on trunk revision 19164 Tested on: Tomcat6.0, FF3.5 and IE7 Test app committed to repo\qa\trunk\Regression\ ICE-4584
        Ken Fyten made changes -
        Fix Version/s 1.8.2-RC1 [ 10210 ]
        Ken Fyten made changes -
        Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2

          People

          • Assignee:
            yip.ng
            Reporter:
            Arran Mccullough
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: