I use primefaces version 5.3 and jsf version 2.2.6.
I implemented a tabClose ajax event for a tabview, but the problem is that for the first tab, the tabClose event isn't triggered and the method remove isn't called, for all the other tabs, it is and it works and I can't understand why. Additionally, if I try to close the first tab, all the tabs are closed.
The code looks like this:
<p:tabView id="tabs" activeIndex="#{mainPage.index}">
<p:ajax event="tabClose" listener="#{mainPage.remove}" update="formTabs" />
<p:ajax event="tabChange" listener="#{mainPage.changeTab}" update="formTabs" />
<c:forEach items="#{mainPage.tabs}" var="tab" varStatus="loop">
<p:tab title="#{tab.title}" closable="true">
<f:subview id="tab#{loop.index}">
<ui:debug />
<ui:include src="#{tab.url}">
<ui:param name="focusedTab" value="#{tab.id}" />
</ui:include>
</f:subview>
</p:tab>
</c:forEach>
</p:tabView>
Does anybody know what the cause could be?