Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.3.0.GA
-
Fix Version/s: EE-3.3.0.GA_P01, 4.0.BETA, 4.0
-
Component/s: Framework
-
Labels:None
-
Environment:All
-
Assignee Priority:P1
Description
The framework core, compat and ACE components make multiple subsequent calls to ResponseWriter.write and ResponseWriter.writeText, to output fragments of javascript, which get rendered out as a single javascript call due to our framework concatenating them.
Either from the DOM cloning or the FastInfoSet copying (definitely latter but possibly also former), we now have situations where the old DOM has a single TEXT node for javascript calls, while the new DOM has the multiple sibling TEXT nodes, so a DOM difference occurs. This can trigger HEAD updates, and at the very least, cause javascript to re-execute that we may have intended to not be executed beyond the first time it was rendered.
Example of files affected that I have fixed in my workplan:
M icefaces/compat/core/src/main/java/com/icesoft/faces/application/ExtrasSetup.java
M icefaces/compat/core/src/main/java/com/icesoft/faces/context/CompatDOMPartialViewContext.java
M icefaces/ace/component/src/org/icefaces/ace/component/selectmenu/SelectMenuRenderer.java
M icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxRenderer.java
M icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
M icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
M icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
M icefaces/core/src/main/java/org/icefaces/impl/component/NavigationNotifier.java
M icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
M icefaces/core/src/main/java/org/icefaces/impl/facelets/tag/icefaces/core/RefreshHandler.java
M icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
Either from the DOM cloning or the FastInfoSet copying (definitely latter but possibly also former), we now have situations where the old DOM has a single TEXT node for javascript calls, while the new DOM has the multiple sibling TEXT nodes, so a DOM difference occurs. This can trigger HEAD updates, and at the very least, cause javascript to re-execute that we may have intended to not be executed beyond the first time it was rendered.
Example of files affected that I have fixed in my workplan:
M icefaces/compat/core/src/main/java/com/icesoft/faces/application/ExtrasSetup.java
M icefaces/compat/core/src/main/java/com/icesoft/faces/context/CompatDOMPartialViewContext.java
M icefaces/ace/component/src/org/icefaces/ace/component/selectmenu/SelectMenuRenderer.java
M icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxRenderer.java
M icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
M icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
M icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
M icefaces/core/src/main/java/org/icefaces/impl/component/NavigationNotifier.java
M icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
M icefaces/core/src/main/java/org/icefaces/impl/facelets/tag/icefaces/core/RefreshHandler.java
M icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
Issue Links
- blocks
-
ICE-9404 RuntimeException: Cannot clone document
-
- Closed
-
The one good thing about the multiple TEXT nodes was that the memory usage before serialisation was minimised, since the Strings that were constants were preserved and isolated from the Strings that were dynamically generated (viewId, clientIds). By concatenating the TEXT nodes together, operations may be simpler and faster, but they're not interned or even internable.