ICEfaces
  1. ICEfaces
  2. ICE-4156

SelectInputDate is incorrectly initialized

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8RC1
    • Fix Version/s: 1.8RC2, 1.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      Icefaces RC! rev.18438
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      public void validate(FacesContext context) {
      (..)
                      if (isShowPopup()) setSubmittedValue(null); // if popup was closed, process submitted value
      > else setPopupDate(null);
      (...)
      }
      Show
      public void validate(FacesContext context) { (..)                 if (isShowPopup()) setSubmittedValue(null); // if popup was closed, process submitted value > else setPopupDate(null); (...) }

      Description

      Scenario:
      - datatable with popup editor opened on selected row
      - popup contain selectInpudDate field
      - open popup on first row, select date, close popup
      - open popup on another row, you see date from previous row

      Bug is in SelectInpuDate.java. Popup date shold be cleared on date popup close
      Patch can be included in validate method.


        Activity

        Hide
        Mark Collette added a comment -

        I investigated various means of limiting the duration we maintain the popupDate field, but it ended up being more straightforward to fix this with ICE-4184, of instead better saving popupDate, rather than trying to discard it.

        Subversion 18506
        icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java

        Show
        Mark Collette added a comment - I investigated various means of limiting the duration we maintain the popupDate field, but it ended up being more straightforward to fix this with ICE-4184 , of instead better saving popupDate, rather than trying to discard it. Subversion 18506 icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
        Hide
        Mandeep Hayher added a comment -

        1) Open popup calendar for any row that doesnot have a date in it
        2) Make sure no date is highlighted in the calendar and the time selected is current time
        3) Select a date and time & close the calendar
        4) The selected date should be displayed in the date input box

        The test is failing because condition (4) is not being met.

        Show
        Mandeep Hayher added a comment - 1) Open popup calendar for any row that doesnot have a date in it 2) Make sure no date is highlighted in the calendar and the time selected is current time 3) Select a date and time & close the calendar 4) The selected date should be displayed in the date input box The test is failing because condition (4) is not being met.
        Hide
        Mandeep Hayher added a comment -

        Test application available at '\repo\qa\trunk\Regression\ICE-4156'.

        Show
        Mandeep Hayher added a comment - Test application available at '\repo\qa\trunk\Regression\ ICE-4156 '.
        Hide
        Krashan Brahmanjara added a comment -

        Last changes from Mark does'nt help in sequence described at beginning.

        If user change row data calendar must be reinitialized not restored.

        At current moment workaround with setPopupDate(null); onClose is better.

        Show
        Krashan Brahmanjara added a comment - Last changes from Mark does'nt help in sequence described at beginning. If user change row data calendar must be reinitialized not restored. At current moment workaround with setPopupDate(null); onClose is better.
        Hide
        Mark Collette added a comment -

        I tried using setPopup(null), as you described, and the component did not function properly. And irrespective of the symptoms you're interested in, the state has to be saved, per row, for the component to work properly. The real fix should be finshed soon.

        Show
        Mark Collette added a comment - I tried using setPopup(null), as you described, and the component did not function properly. And irrespective of the symptoms you're interested in, the state has to be saved, per row, for the component to work properly. The real fix should be finshed soon.
        Hide
        Mark Collette added a comment -

        Better delineated the value from the popupDate.

        Subversion 18562
        icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
        icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java

        Show
        Mark Collette added a comment - Better delineated the value from the popupDate. Subversion 18562 icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Hide
        Joanne Bai added a comment -

        QA verified it on 1.8.0 RC2 build 1 (tomcat6 + FF2 and IE6 and Opera9.27)

        It works fine except that on IE6, the selected drop-down list (month, year, time, AM/PM) items all flicker when there's a click/select on items of the popup calendar.

        For the test code, there was some issue of directly using a List or Dates, which was resolved when Mark suggested to use a List of Objects that refer to Dates

        Show
        Joanne Bai added a comment - QA verified it on 1.8.0 RC2 build 1 (tomcat6 + FF2 and IE6 and Opera9.27) It works fine except that on IE6, the selected drop-down list (month, year, time, AM/PM) items all flicker when there's a click/select on items of the popup calendar. For the test code, there was some issue of directly using a List or Dates, which was resolved when Mark suggested to use a List of Objects that refer to Dates

          People

          • Assignee:
            Unassigned
            Reporter:
            Krashan Brahmanjara
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: