{"action":"closed","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/1279","repository_url":"https://api.github.com/repos/primefaces/primefaces","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/1279/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/1279/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/1279/events","html_url":"https://github.com/primefaces/primefaces/issues/1279","id":144604814,"number":1279,"title":"tabClose method is not called for the first tab from tabview","user":{"login":"idomiralin","id":1615949,"avatar_url":"https://avatars.githubusercontent.com/u/1615949?v=3","gravatar_id":"","url":"https://api.github.com/users/idomiralin","html_url":"https://github.com/idomiralin","followers_url":"https://api.github.com/users/idomiralin/followers","following_url":"https://api.github.com/users/idomiralin/following{/other_user}","gists_url":"https://api.github.com/users/idomiralin/gists{/gist_id}","starred_url":"https://api.github.com/users/idomiralin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idomiralin/subscriptions","organizations_url":"https://api.github.com/users/idomiralin/orgs","repos_url":"https://api.github.com/users/idomiralin/repos","events_url":"https://api.github.com/users/idomiralin/events{/privacy}","received_events_url":"https://api.github.com/users/idomiralin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-30T14:10:56Z","updated_at":"2016-03-30T14:19:24Z","closed_at":"2016-03-30T14:19:24Z","body":"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.\r\n\r\nThe reason why I used c:foreach is this:\r\n[http://stackoverflow.com/questions/20111010/jsf-dynamically-include-src-in-uiinclude-src-bean-pagepath](url)\r\n\r\nThe code looks like this:\r\n\r\n<p:tabView id=\"tabs\" activeIndex=\"#{mainPage.index}\">\r\n<p:ajax event=\"tabClose\" listener=\"#{mainPage.remove}\" update=\"formTabs\" />\r\n<p:ajax event=\"tabChange\" listener=\"#{mainPage.changeTab}\" update=\"formTabs\" />\r\n\r\n<c:forEach items=\"#{mainPage.tabs}\" var=\"tab\" varStatus=\"loop\">\r\n<p:tab title=\"#{tab.title}\" closable=\"true\">\r\n<f:subview id=\"tab#{loop.index}\">\r\n<ui:debug />\r\n<ui:include src=\"#{tab.url}\">\r\n<ui:param name=\"focusedTab\" value=\"#{tab.id}\" />\r\n</ui:include>\r\n</f:subview>\r\n</p:tab>\r\n</c:forEach>\r\n</p:tabView>"}}