Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-547

Semantic group component, its DOM, its children

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.0-incubating-core
    • 1.0.0-incubating-core
    • None
    • None

    Description

      Update the CoreGroupRenderer so that it renders zero DOM for itself since it is a semantic wrapper. Currently it renders a span element and an ID attribute--it should render nothing except for its children in their raw HTML form. This component is not a layout component so there should be no DIVs, TDs, or SPANs around its children.

      A patch will be added that cleans all of this up. It has no side effects for parents that treat groups specially, e.g. the panelFormLayout. Note that the patch removes renderkit tests (the golden file tests) because this component has no visual representation. It also happens to break the unit test implementation of the ResponseWriter in its startElement because it will get confused with the component tree since the group renders no elements for itself. The particular stack trace is:

      junit.framework.AssertionFailedError: The wrong UIComponent was passed to startElement("span",...)
      at org.apache.myfaces.trinidadinternal.renderkit.GatherContent$CheckUIComponent.startElement(GatherContent.java:110)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputTextRenderer.encodeBegin(OutputTextRenderer.java:58)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeBegin(CoreRenderer.java:159)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeBegin(UIXComponentBase.java:640)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:244)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:277)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.GroupRenderer.encodeAll(GroupRenderer.java:67)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:181)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:673)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:66)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:61)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:255)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:277)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:70)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:134)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:150)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:76)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.delegateRenderer(CoreRenderer.java:294)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:78)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:181)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:673)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:66)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:61)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitTestCase$BaseTest.renderRoot(RenderKitTestCase.java:177)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitTestCase$RendererTest.runTest(RenderKitTestCase.java:323)
      at junit.framework.TestCase.runBare(TestCase.java:127)

      Attachments

        1. trinidad.patch
          23 kB
          Matt Cooper

        Activity

          People

            Unassigned Unassigned
            mattcooper Matt Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: