Details
-
Type: Bug
-
Status: Closed
-
Priority: 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."
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."
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.