Skizzo
Skizzo

Reputation: 2983

Close tab dynamically not work rich:tabPanel

I have a rich:tabPanel where add tabs dinamically

<c:forEach var="tab" items="#{tabsBean.tabs}" >
   <rich:tab  name="#{tab.name}"  >
     <h:form id="#{tab.name}" >
       <f:facet name="header">
          <h:outputText value="#{tab.name}" />
            <a4j:commandLink value="X" action="#{tabsBean.removeTab(tab)}" />
       </f:facet>
         <ui:include src="#{tab.path}" />
      </h:form>
     </rich:tab>
 </c:forEach> 

The troubles are

command link (X) is not show and when i close the tab i would open the @perv tab

How can i do?

Upvotes: 1

Views: 333

Answers (1)

Andrey
Andrey

Reputation: 6766

f:facet name="header" must be a direct child of rich:tab (in your code it is a facet of h:form, but h:form does not support such facet, so it is not shown).

Note also if you are using RichFaces 4.x then you can not have form elements inside individual tabs, it is not supported yet, refer to: https://issues.jboss.org/browse/RF-11306

Upvotes: 1

Related Questions