title: Primefaces tabview: set Active Index after some counting
body: <p>I've got a tab view that contains four tabs and three commandButtons(count,add to Table, export to Word) over them.</p>
  
  <p>I input some text data in first tab, some numeric data in second tab, then when I am pressing first commandButton(count), my programm do some countings, but I can't set Active Index on third Tab where I show result of counting.</p>
  
  <pre><code>&lt;h:form id="dataForm1" prependId="false"&gt;
     &lt;div&gt;
        &lt;p:commandButton id="count" update="tbv" process="tbv:tab1 tbv:tab2" /&gt;
        &lt;p:commandButton id="addToWord" .... /&gt;
        &lt;p:commandButton id="exportToWord" ... /&gt;
     &lt;/div
     &lt;div&gt;
        &lt;p:growl id="growlm" showDetail="true" /&gt; 
      &lt;p:tabView activeIndex="#{disableTag.activeTabIndex}" id="tbv" tabChangeListener="#{disableTag.onTabChange}"&gt;
          &lt;p:ajax event="tabChange" listener="#{disableTag.onTabChange}" update=":dataForm1:growlm" /&gt;
            &lt;p:tab id="tab1"&gt;some text data &lt;/p:tab&gt;
            &lt;p:tab id="tab2"&gt;some numeric data&lt;/p:tab&gt;
            &lt;p:tab id="tab3"&gt;result of counting from tab2&lt;/p:tab&gt;
            &lt;p:tab id="tab4"&gt;table&lt;/p:tab&gt;
       &lt;/p:tabView&gt;
  </code></pre>
  
  <p>Backing bean
          public int getActiveTabIndex() {
          return activeTabIndex;
      }</p>
  
  <pre><code>public void setActiveTabIndex(int activeTabIndex) {
      this.activeTabIndex = activeTabIndex;
  }
  
  public void onTabChange(TabChangeEvent event) {
      TabView tv = (TabView) event.getComponent();
      this.setActiveTabIndex(tv.getActiveIndex());
      System.out.println("###### ACtive tab: "+activeTabIndex);
  }
  </code></pre>
  
  <p>But it is not working for me, do you have any idea: how i can set third tab activeIndex=2 after countings?</p>