ICEfaces
  1. ICEfaces
  2. ICE-9307

Server side onElementUpdate implementation notifies on element addition

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces
    • Assignee Priority:
      P1

      Description

      Server side onElementUpdate implementation notifies on element addition instead of sending the notification on element replace or remove.

      Here are Marks' findings:
      "I updated my code and ran the memoryLeak test application with server side update notification, watching the Firebug Net tab, and what I saw was that when the ace:dateTimeEntry components are added to the page, the notification is sent:

      <eval><![CDATA[ice.notifyOnElementUpdateCallbacks(['frm:j_idt7:0:testDateOne', ...
      But when the ace:dateTimeEntry components are removed from the page, the notification is not sent. This is exactly reversed. We don't want their notification when they're added, only when they're removed."

        Activity

        Hide
        Mircea Toma added a comment -

        This issue is caused by the modification that the subtree rendering does to the old DOM. By the time the elements to be notified are collected the oldDOM was changed to match the new DOM structure with exception of the subtree. This confuses the onElementUpdate implementation because it finds the onElementUpdate marked elements as residing in the old DOM, and thus assuming that they are going to be updated.

        Show
        Mircea Toma added a comment - This issue is caused by the modification that the subtree rendering does to the old DOM. By the time the elements to be notified are collected the oldDOM was changed to match the new DOM structure with exception of the subtree. This confuses the onElementUpdate implementation because it finds the onElementUpdate marked elements as residing in the old DOM, and thus assuming that they are going to be updated.
        Hide
        Mircea Toma added a comment - - edited

        The applied fix passes in a copy of the old DOM when rendering component subtrees to avoid the mutation of the oldDOM.

        Show
        Mircea Toma added a comment - - edited The applied fix passes in a copy of the old DOM when rendering component subtrees to avoid the mutation of the oldDOM.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: