Using c: foreach with Richfaces 4

My problem is that I am trying to make dynamic tabs with tabPanel, so I want to read some information about these tabs from my bean. And that is why I use c: foreach. So here is this piece of code:

<a4j:outputPanel id="output">
    <rich:tabPanel width="40%" headerAlignment="right" switchType="client" binding="#{searchRequest.tabPanel}">
        <rich:tab header="#{lang.tab_basic}" id="tabBasic" name="tabBasic">
        ............Content of the first non-dynamic tab..............          
        </rich:tab>

        <c:forEach items="#{searchSession.tabs}" var="tab">
            <rich:tab name="#{tab.name}" >
                <f:facet name="label">
                    <h:panelGrid columns="2">
                        <h:outputText value="#{tab.name}" />
                        <h:graphicImage value="images/icons/delete.gif" 
                            style="width:12px; height:12px;" 
                            onclick="myFunc('#{tab.name}'); Event.stop(event);"/>
                    </h:panelGrid>
                </f:facet>
                <h:outputText value="#{tab.html}" escape="false"/>
            </rich:tab>
        </c:forEach>

    </rich:tabPanel>
</a4j:outputPanel>

Everything seems clear to me, but, as usual, I don’t see something, so I would be very grateful if someone would tell me what it is.

+1
source share
1 answer

I do not think there is a labelline for rich:tab(at least it is not mentioned in the documents ).

0
source

All Articles