ICEfaces
  1. ICEfaces
  2. ICE-9398

DOM clone/copy reduces adjacent TEXT nodes which causes unintended DOM differences, so javascript executes redundantly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36697 Mon Jul 15 15:28:54 MDT 2013 mircea.toma ICE-9398 Make sure the imported node is added to the document and all ID-ed elements can be looked up.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36616 Tue Jul 09 14:28:11 MDT 2013 mircea.toma ICE-9398 Modified generateElementUpdateNotifications method to adapt to the type of edit operation it receives. If the operation's ID is not set then operation's element ID attribute is used for looking up the updated element. When neither of methods succeed a warning message is logged.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36608 Mon Jul 08 16:47:13 MDT 2013 mircea.toma ICE-9398 Revert back to native DOM cloning but with error checking turned off.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: