ICEfaces
  1. ICEfaces
  2. ICE-7355

Exception when trying to use stacked columns inside ace:columnGroup/ace:row

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any
    • Assignee Priority:
      P1

      Description

      If one sets stacked="true" to an ace:column component that is a child of ace:row and ace:columnGroup, there's an exception thrown in the console and also displayed on the page.

      The markup looks like this:

                      <ace:columnGroup type="header">
                          <ace:row>
                              <ace:column >
                                  <f:facet name="header">
                                      Item One
                                  </f:facet>
                              </ace:column>
                              <ace:column stacked="true">
                                  <f:facet name="header">
                                      Item Two
                                  </f:facet>
                              </ace:column>
                              ...

      ...and this is the exception thrown:

      java.lang.RuntimeException: failed to append text[] into #document
              at org.icefaces.impl.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:406)
              at org.icefaces.impl.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:382)
              at org.icefaces.impl.context.DOMResponseWriter.writeText(DOMResponseWriter.java:323)
              at com.sun.faces.facelets.compiler.LiteralTextInstruction.write(LiteralTextInstruction.java:76)
              at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
              at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
              at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
              at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was madeto insert a node where it is not permitted.
              at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:356)
              at com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:284)
              at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(oreDocumentImpl.java:399)
              at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:235)
              at org.icefaces.impl.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:401)
              ... 29 more

        Activity

        Hide
        Arturo Zambrano added a comment -

        Attached test case.

        Just navigate to http://localhost:8080/ice7355/ and the exception will be shown on the page. If you edit the welcomeICEfaces.xhtml file and remove stacked="true" from the second column inside the second ace:row and load the page again, the page will load normally.

        Show
        Arturo Zambrano added a comment - Attached test case. Just navigate to http://localhost:8080/ice7355/ and the exception will be shown on the page. If you edit the welcomeICEfaces.xhtml file and remove stacked="true" from the second column inside the second ace:row and load the page again, the page will load normally.
        Hide
        Nils Lundquist added a comment -

        This case is trying to used stacked columns and grouped column headers, a documented incompatibility.

        Show
        Nils Lundquist added a comment - This case is trying to used stacked columns and grouped column headers, a documented incompatibility.
        Hide
        Nils Lundquist added a comment -

        This issue was due to a logic bug in the header renderer resulting in an unopened stacked column.

        This was resolved and the following restrictions were placed on the use of stacked columns in the multi row headers/footers.

        • All columns to be stacked must have colspan 1
        • All column to be stacked must have equal rowspan values

        Another restriction was proposed was that all columns must share the same columns spanning them in rows higher or lower than themselves. Despite the difficulty of implementing this, it's implementation would have to infer that each row must always have the 'max' number of columns (or equivalent in colspans). This is to distinguish between the case of a user knowingly stacking the last row column of particular spanning parent, versus incidentally stacking the last column of particular spanning parent, with what is intended to be the first row column of a new spanning parent. This requirement would disable some header designs with purposefully unfilled rows, that would normally be legal HTML. Because of that, the difficulty of implementation and the ease the developer would have visually identifying the problem, I would nominate not to implement this handling.

        Show
        Nils Lundquist added a comment - This issue was due to a logic bug in the header renderer resulting in an unopened stacked column. This was resolved and the following restrictions were placed on the use of stacked columns in the multi row headers/footers. All columns to be stacked must have colspan 1 All column to be stacked must have equal rowspan values Another restriction was proposed was that all columns must share the same columns spanning them in rows higher or lower than themselves. Despite the difficulty of implementing this, it's implementation would have to infer that each row must always have the 'max' number of columns (or equivalent in colspans). This is to distinguish between the case of a user knowingly stacking the last row column of particular spanning parent, versus incidentally stacking the last column of particular spanning parent, with what is intended to be the first row column of a new spanning parent. This requirement would disable some header designs with purposefully unfilled rows, that would normally be legal HTML. Because of that, the difficulty of implementation and the ease the developer would have visually identifying the problem, I would nominate not to implement this handling.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: