ICEfaces
  1. ICEfaces
  2. ICE-4504

DOMPartialViewContext rendering facets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Alpha2, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces

      Description


      When using the <f:ajax> tag, the following stack trace is observed:

      org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
      at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(CoreDocumentImpl.java:419)
      at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:275)
      at org.icefaces.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:401)
      at org.icefaces.context.DOMResponseWriter.startElement(DOMResponseWriter.java:236)
      at com.sun.faces.facelets.compiler.StartElementInstruction.write(StartElementInstruction.java:68)
      at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:74)
      at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:178)
      at org.icefaces.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:102)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1609)


      This is due to a script node being placed in the DOM outside of the html element, causing an attempt to create an XML document with two root elements.

        Activity

        Hide
        Ted Goddard added a comment -

        The root cause appears to be the following code in DOMPartialViewContext (borrowed from the RI PartialViewcontextImpl):

        Iterator<UIComponent> itr = viewRoot.getFacetsAndChildren();

        The facet script nodes to be later rendered by the <h:head> component are initially rendered out of place. It is not clear why the reference implementation contains facet traversal in Ajax rendering.

        Show
        Ted Goddard added a comment - The root cause appears to be the following code in DOMPartialViewContext (borrowed from the RI PartialViewcontextImpl): Iterator<UIComponent> itr = viewRoot.getFacetsAndChildren(); The facet script nodes to be later rendered by the <h:head> component are initially rendered out of place. It is not clear why the reference implementation contains facet traversal in Ajax rendering.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: