1

I'm trying to build a recursive composite component. But somehow I can't get the recursion to stop. Meaning I get an StackOverflowException.

I have looked at that question: https://stackoverflow.com/questions/17923220/

But I'm missing a thing. I have a tree like structure, where a node can zero to n children.

<cc:interface componentType="elementContainer">
    <cc:attribute name="model"
        type="de.foobar.Element"
        required="true" />
</cc:interface>

<cc:implementation>
    <p:panelGrid columns="6">
        <c:if test="#{not empty cc.attrs.model.children}">

        <c:forEach var="element"
            items="#{cc.attrs.model.children}">

            <ic:ElementContainer model="#{element}" />
        </c:forEach>

        </c:if>
    </p:panelGrid>
</cc:implementation>

Even without the c:if shouln't stop the recursion when the items attribute evaluates to an empty list?

Community
  • 1
  • 1
Angelo.Hannes
  • 1,729
  • 1
  • 18
  • 46
  • possible duplicate of [Nested JSF Composite Components leading to a Stack Overflow exception](http://stackoverflow.com/questions/29987055/nested-jsf-composite-components-leading-to-a-stack-overflow-exception) – Richard Tingle May 01 '15 at 15:53

0 Answers0