JSF composite component childrens

Is there any way using EL to retrieve a children list so i can iterate through it with

<ul>
   <ui:repeat value="#{Magic El expression}" var="children" >
      <li>
      <p> #{children.title} *</p>
      </li>
   </ui:repeat>
</ul>
<div>
 <cc:insertChildren />
</div>

* perhaps #{children.attrs.title} I don't know?

What I'm trying to do here is create a Tab composite component. I know libraries such as primefaces offer tabview etc. Yet I need to create my own because of extended jquery functionality. Plus I'm working with a specific template. I need to get the tabs title to create a list for tabs. Tabs are children components is there anyway i can iterate and fetch their attributes? I mean primefaces does that somehow.

If you look at their html markup they create an unordered list with the titles of each children tabview component. How is that implemented?


ANSWERS:


If the markup you show is inside a composite component (I guess it is), then the following is the expression that will give you access to its children:

#{component.getCompositeComponentParent(component).children}

Slightly related question: In JSF2, how to know if composite component has children?


If you Composite Component is an instance of : javax.faces.component.UINamingContainer Try this:

    <c:forEach items="#{cc.children}" varStatus="loop" var="child">
      loop[#{loop.index}]: #{child.getAttributes().get('title')}
    </c:forEach>

You can easily debug which instance are your JSF variables by printing them to the page like #{cc} or #{component}

Cheers!



 MORE:


 ? JSF Composite component and selectItems
 ? JSF Recursive Composite Component
 ? JSF, Composite Component: method call with default attribute value as parameter
 ? JSF composite:actionSource in nested composite components
 ? JSF Backing Component - Composite Component - Stackoverflow Exception
 ? JSF Composite Component argument update
 ? Composite JSF component with converter
 ? JSF 2.2 Composite Component EditableValueHolder
 ? Cassandra export/forward data only once
 ? progress bar implementation using <pe:exporter > in primefaces