ICEfaces
  1. ICEfaces
  2. ICE-6941

toggleOnInput set to true causes unresponsive browser

    Details

    • Assignee Priority:
      P1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Set toggleOnInput to false

      Description

      A row selectable dataTable has a commandLink which opens a popup (either modal or non modal). When the rowSelector attribute toggleOnInput is set to true, the resulting popup displays but the browser appears to hang. This does not occur with toggleOnInput set to false. I see the following JS error in Firebug:

      element is null
      return parentStream(element.parentNode);

      coming from our bridge code here:

      function parents(element) {
      return Stream(function(cellConstructor) {
      function parentStream(e) {
      if (e == null || e == document) return null;
      return function() {
      return cellConstructor(e, parentStream(e.parentNode));
      };
      }
      return parentStream(element.parentNode);
      });
      }

      Test case attached.

        Activity

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment 10181_screen.jpg [ 13288 ]
        Tyler Johnson made changes -
        Attachment sc10181.war [ 13289 ]
        Tyler Johnson made changes -
        Salesforce Case [5007000000GvmZm]
        Ken Fyten made changes -
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Fix Version/s 2.1 [ 10241 ]
        Assignee Priority P1
        Assignee yip.ng [ yip.ng ]
        Hide
        yip.ng added a comment -

        Can't reproduce in FF or IE, ICEfaces 1.8 or 2, modal or nonmodal, draggable or undraggable. See video at http://screencast.com/t/D5ABowoLB

        Show
        yip.ng added a comment - Can't reproduce in FF or IE, ICEfaces 1.8 or 2, modal or nonmodal, draggable or undraggable. See video at http://screencast.com/t/D5ABowoLB
        Hide
        yip.ng added a comment -

        From Tyler:

        Did you try with the attached test case? I was able to reproduce it reliably. Test case intended for deployment on Tomcat 6.

        Show
        yip.ng added a comment - From Tyler: Did you try with the attached test case? I was able to reproduce it reliably. Test case intended for deployment on Tomcat 6.
        Hide
        yip.ng added a comment -

        Transplanted code into component showcase and ran in Tomcat 7. See video posted above. Will set up webapp project separately and try again.

        Show
        yip.ng added a comment - Transplanted code into component showcase and ran in Tomcat 7. See video posted above. Will set up webapp project separately and try again.
        yip.ng made changes -
        Attachment screenshot-02.png [ 13303 ]
        Hide
        yip.ng added a comment - - edited

        See screenshot 2 for the chain of calls that lead to error.

        Show
        yip.ng added a comment - - edited See screenshot 2 for the chain of calls that lead to error.
        Hide
        yip.ng added a comment - - edited

        Seems on an ajax submit send the bridge is executing a listener which requests the view id of the event source, but somehow the event source element has become null.

        Show
        yip.ng added a comment - - edited Seems on an ajax submit send the bridge is executing a listener which requests the view id of the event source, but somehow the event source element has become null.
        Ken Fyten made changes -
        Assignee yip.ng [ yip.ng ] Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24802 Mon Jun 13 04:37:36 MDT 2011 mircea.toma ICE-6941 Assign ID to hidden input element used as submit source to allow JSF submit to lookup the element.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24803 Mon Jun 13 04:38:26 MDT 2011 mircea.toma ICE-6941 Assign ID to hidden input element used as submit source to allow JSF submit to lookup the element.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Hide
        Mircea Toma added a comment -

        When javax,faces.request function is invoked it tries to lookup the source element by using its ID (passed in as parameter). If the source element does not have an ID the lookup will return the null value. The callback registered by ICEfaces/compat then tries to use the source object to find the bridge bridge configuration, but fails because the passed in source element is null.

        The fix changes the TableRenderer to assign an ID to the hidden input element used as submit source to allow JSF submit to lookup the element.

        Show
        Mircea Toma added a comment - When javax,faces.request function is invoked it tries to lookup the source element by using its ID (passed in as parameter). If the source element does not have an ID the lookup will return the null value. The callback registered by ICEfaces/compat then tries to use the source object to find the bridge bridge configuration, but fails because the passed in source element is null. The fix changes the TableRenderer to assign an ID to the hidden input element used as submit source to allow JSF submit to lookup the element.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ken Fyten added a comment -

        As a result of this change, the regression-test for ICE-2024 is failing. Row selection is not reset anymore when multiple row selection checkbox is checked or unchecked (and should be).

        Testcase is available at 'svn\repo\qa\trunk\Regression-Icefaces2\Nightly\ICE-2024'.

        The testcase first started failing on icefaces-2.0.x-maintenance/icefaces revision# 24828

        Yip has confirmed that backing out the commit for this issue resolved the issue.

        Show
        Ken Fyten added a comment - As a result of this change, the regression-test for ICE-2024 is failing. Row selection is not reset anymore when multiple row selection checkbox is checked or unchecked (and should be). Testcase is available at 'svn\repo\qa\trunk\Regression-Icefaces2\Nightly\ ICE-2024 '. The testcase first started failing on icefaces-2.0.x-maintenance/icefaces revision# 24828 Yip has confirmed that backing out the commit for this issue resolved the issue.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24847 Mon Jun 20 15:00:16 MDT 2011 mircea.toma ICE-6941 Avoid clearing the "id" attribute of the hidden input element so that following DOM updates can find the element.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/javascript/extras/extras.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24848 Mon Jun 20 15:16:54 MDT 2011 mircea.toma ICE-6941 Avoid clearing the "id" attribute of the hidden input element so that following DOM updates can find the element.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/core/src/main/javascript/extras/extras.js
        Hide
        Mircea Toma added a comment -

        The last issue is triggered when Ice.tableRowClicked clears the "id" attribute of the hidden input element and later the DOM update tries to apply an update to the same element but fails to find the element in the document (JSF throws a "malformedXML" error).
        The clearing of the "id" attribute goes back to ICE-2874 where the "trick" was used to avoid the deselection of the last row when any other action in the page was triggered.

        After removing the clearing of the "id" and testing again I could not detect any change in behavior of the datatable except the fixing of the JS error. So this was the applied fix. The fix for any regression detected in the future should try to keep in sync the browser DOM with the server side DOM in order to avoid exactly this kind of problems.

        Show
        Mircea Toma added a comment - The last issue is triggered when Ice.tableRowClicked clears the "id" attribute of the hidden input element and later the DOM update tries to apply an update to the same element but fails to find the element in the document (JSF throws a "malformedXML" error). The clearing of the "id" attribute goes back to ICE-2874 where the "trick" was used to avoid the deselection of the last row when any other action in the page was triggered. After removing the clearing of the "id" and testing again I could not detect any change in behavior of the datatable except the fixing of the JS error. So this was the applied fix. The fix for any regression detected in the future should try to keep in sync the browser DOM with the server side DOM in order to avoid exactly this kind of problems.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 2.1 [ 10241 ]
        Evgheni Sadovoi made changes -
        Salesforce Case [5007000000GvmZm] [5007000000GvmZm, 5007000000JN9KZ]
        Tyler Johnson made changes -
        Salesforce Case [5007000000GvmZm, 5007000000JN9KZ] [5007000000GvmZm, 5007000000JN9KZ, 5007000000JOhAZ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: