title: Primefaces 5.0 tabs close listener not working
body: <p>The TabCloseEvent is not getting fired if tabs generated from backing bean.
  TabCloseEvent is working fine with normal xhtml tabs.</p>
  
  <p>Here is my code</p>
  
  <pre><code>   &lt;html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:p="http://primefaces.org/ui"&gt;
          &lt;h:head&gt;
              &lt;title&gt;Test Title&lt;/title&gt;
          &lt;/h:head&gt;
          &lt;h:body&gt;
              &lt;h:form id="form"&gt;
                  &lt;p:growl id="growl" showDetail="true" /&gt;
  
                  &lt;p:tabView id="tabview"
                             value="#{TestBean.tabList}"
                             var="tab"
                             widgetVar="tabviewV"&gt;
  
                      &lt;p:ajax event="tabClose" listener="#{TestBean.onTabCloseAction}"  update=":form:growl"/&gt;
                      &lt;p:tab id="tab"  title="#{tab}" closable="true" &gt;
                          &lt;h:outputText value="#{tab}"/&gt;
                      &lt;/p:tab&gt;
                  &lt;/p:tabView&gt;
  
              &lt;/h:form&gt;
  
          &lt;/h:body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>the managed bean</p>
  
  <pre><code>    @ManagedBean(name = "TestBean")
      @ViewScoped
      public class TestBean {
  
          private List&lt;String&gt; tabList = new ArrayList&lt;String&gt;();
  
          public TestBean() {
              tabList.add("Test Tab 1");
              tabList.add("Test Tab 2");
              tabList.add("Test Tab 3");
              tabList.add("Test Tab 4");
          }
  
          public void onTabCloseAction(TabCloseEvent event) {
              System.out.println("Tab Closed Event : " + event.getTab().getTitle());
              FacesMessage msg = new FacesMessage("Tab Closed", "Closed tab: " + event.getTab().getTitle());
              FacesContext.getCurrentInstance().addMessage(null, msg);
          }
  
          public List&lt;String&gt; getTabList() {
              return tabList;
          }
  
          public void setTabList(List&lt;String&gt; tabList) {
              this.tabList = tabList;
          }
      }
  </code></pre>
  
  <p>I'm using Primefaces 5.0. also I tried using process="@this" in side p:ajax but result is same.</p>