ICEfaces
  1. ICEfaces
  2. ICE-8202

ice:selectInputDate value can't be cleared with icecore:singleSubmit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.GA, 3.1.0.BETA1
    • Fix Version/s: EE-3.0.0.GA_P01, 3.2
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Workaround Exists:
      Yes
    • Workaround Description:
      Using partialSubmit=true on the component seems to work better.

      Description

      If you try and clear out the input field for the selectInputDate component the previously entered value is shown once you tab out. This can be reproduced using the online showcase demo. With the popup sample if you select the text in the input field, click the delete button, and then tab out of the component, the original value is shown again.

      1. Case11323Example.zip
        18 kB
        Arran Mccullough
      2. Case11323ExampleWAR.zip
        9.73 MB
        Arran Mccullough
      1. screenshot-01.png
        209 kB
      2. screenshot-02.png
        211 kB
      3. screenshot-03.png
        222 kB
      4. screenshot-04.png
        236 kB
      5. screenshot-05.png
        225 kB
      6. screenshot-06.png
        181 kB

        Activity

        Hide
        Arran Mccullough added a comment -

        Steps to reproduce issue with attached isolates test case:

        • Load welcomeICEfaces.jsf page.
        • Click the calendar icon to choose a date.
        • Select the contents of the input field and hit the delete button.
        • Tab out of the input field, the previous value is shown again.
        Show
        Arran Mccullough added a comment - Steps to reproduce issue with attached isolates test case: Load welcomeICEfaces.jsf page. Click the calendar icon to choose a date. Select the contents of the input field and hit the delete button. Tab out of the input field, the previous value is shown again.
        Hide
        yip.ng added a comment -

        No such problem in 1.8. The difference in behavior is that in 1.8, there is no update from server because there is no DOM diff., which is correct; whereas in 3.1 there is update from server even though there is no DOM diff., which is wrong? See screenshot-01 and -02.png.

        Show
        yip.ng added a comment - No such problem in 1.8. The difference in behavior is that in 1.8, there is no update from server because there is no DOM diff., which is correct; whereas in 3.1 there is update from server even though there is no DOM diff., which is wrong? See screenshot-01 and -02.png.
        Hide
        yip.ng added a comment - - edited

        Seems in 3.1 there is a mysterious extra submit that causes the problem. See screenshot-03.png.

        Show
        yip.ng added a comment - - edited Seems in 3.1 there is a mysterious extra submit that causes the problem. See screenshot-03.png.
        Hide
        yip.ng added a comment -

        Extra submit is from icecore:singleSubmit. Seems default for partialSubmit is true, so in the example there are two submits. We should either use one or the other, not both.

        Show
        yip.ng added a comment - Extra submit is from icecore:singleSubmit. Seems default for partialSubmit is true, so in the example there are two submits. We should either use one or the other, not both.
        Hide
        yip.ng added a comment -

        Explicitly setting partialSubmit to false still doesn't solve the problem. Tracked down the root cause. Some hidden fields are submitted when using partialSubmit, but not when using icecore:singleSubmit. This causes a huge chunk of code in decode() to be missed. See screenshot-04.png.

        Show
        yip.ng added a comment - Explicitly setting partialSubmit to false still doesn't solve the problem. Tracked down the root cause. Some hidden fields are submitted when using partialSubmit, but not when using icecore:singleSubmit. This causes a huge chunk of code in decode() to be missed. See screenshot-04.png.
        Hide
        yip.ng added a comment -

        Suggestion from Mark: move hidden fields to inside component.

        Show
        yip.ng added a comment - Suggestion from Mark: move hidden fields to inside component.
        Hide
        yip.ng added a comment - - edited

        Hidden fields were added via FormRenderer utility method. That's why they were outside of component.

        Use own method to render hidden fields inside component, but it still doesn't work. See screenshots -05 and -06.png.

        Show
        yip.ng added a comment - - edited Hidden fields were added via FormRenderer utility method. That's why they were outside of component. Use own method to render hidden fields inside component, but it still doesn't work. See screenshots -05 and -06.png.
        Hide
        yip.ng added a comment -

        As per discussion in meeting, icecore:singleSubmit may work only for simple single-input-element component. Not working for complex components like calendar, and there is no easy way to fix it for now.

        Show
        yip.ng added a comment - As per discussion in meeting, icecore:singleSubmit may work only for simple single-input-element component. Not working for complex components like calendar, and there is no easy way to fix it for now.
        Hide
        Ken Fyten added a comment -

        It in order to properly support the ice:selectInputDate with ice core:singleSubmit the component will need to be substantially reworked to support singleSubmit actively itself, and not really on the default dom event bubbling technique that the singleSubmit tag uses.

        Currently out of scope pending user demand.

        Show
        Ken Fyten added a comment - It in order to properly support the ice:selectInputDate with ice core:singleSubmit the component will need to be substantially reworked to support singleSubmit actively itself, and not really on the default dom event bubbling technique that the singleSubmit tag uses. Currently out of scope pending user demand.
        Hide
        yip.ng added a comment - - edited

        Check for single submit and use ice.se() where iceSubmitPartial() is being used now. Partial submit should override single submit if both specified. Use same JS utility created in ICE-8389 to cancel bubble.

        Show
        yip.ng added a comment - - edited Check for single submit and use ice.se() where iceSubmitPartial() is being used now. Partial submit should override single submit if both specified. Use same JS utility created in ICE-8389 to cancel bubble.
        Hide
        yip.ng added a comment -

        Done.

        Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\compat\components\src\main\java\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Completed: At revision: 30527

        Show
        yip.ng added a comment - Done. Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\compat\components\src\main\java\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java Completed: At revision: 30527
        Hide
        Ken Fyten added a comment -

        Apply to icefaces-3.0.x-maintenance branch.

        Show
        Ken Fyten added a comment - Apply to icefaces-3.0.x-maintenance branch.
        Hide
        yip.ng added a comment -

        Modified: C:\svn\ossrepo\icefaces3\branches\icefaces-3.0.x-maintenance\icefaces\compat\components\src\main\java\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Completed: At revision: 30549

        Show
        yip.ng added a comment - Modified: C:\svn\ossrepo\icefaces3\branches\icefaces-3.0.x-maintenance\icefaces\compat\components\src\main\java\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java Completed: At revision: 30549

          People

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

            Dates

            • Created:
              Updated:
              Resolved: