Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.2
-
Fix Version/s: 3.3
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces
-
Assignee Priority:P2
Description
Many components make use of complex JavaScript in addition to HTML and CSS. The use of this JavaScript and its initialization and cleanup should be optimized, particularly for components that are used repeatedly in a datatable.
The current cleanup code contains the following which Mark has observed has an unnecessary var element = document.getElementById(id). This has not been removed, however, since it is possible that idCallbackTuple.handler assumes the existence of the element:
elementUpdateListeners = reject(elementUpdateListeners, function(idCallbackTuple) {
var id = idCallbackTuple.identifier;
var element = document.getElementById(id);
//test if inner element still exists, sometimes client side code can remove DOM fragments
if (element) {
var updated = (-1 !=
idCallbackTuple.ancestors.indexOf(" " + updatedElementId + " "));
if (updated) {
var callback = idCallbackTuple.handler;