title: Primefaces submit form on p:tabView tab change
body: <p>I have a huge JSF application created using primefaces version 6.0 running on WebSphere Application Server, Version 8.5.5. I want to avoid nested forms so my <code>p:tabView</code> is not included in a form but each tab has its own form. Source for my tab view looks something like this:</p>
  
  <pre><code>      &lt;p:tabView activeIndex="#{tabViewBean.selectedTab}" id="tabView" dynamic="true" cache="false" widgetVar="tabViewWidget"&gt;
          &lt;p:ajax event="tabChange" listener="#{tabViewBean.handleTabChange}" update=":tabView" /&gt;
          &lt;p:tab id="tab1" title="First tab"&gt;
              &lt;h:form id="FirstTabForm"&gt;
                  &lt;ui:include src="/views/test/firstTabTab.xhtml"/&gt;
              &lt;/h:form&gt;
          &lt;/p:tab&gt;
          &lt;p:tab id="tab2" title="Drugi tab"&gt;
              &lt;h:form id="SecondTabForm"&gt;
                  &lt;ui:include src="/views/test/secondTab.xhtml"/&gt;
              &lt;/h:form&gt;
          &lt;/p:tab&gt;
  
        ... more tabs ...
  
      &lt;/p:tabView&gt;
  </code></pre>
  
  <p>Is there a way I can submit the form inside current tab without clicking commandButton inside it. I would like to achieve that on tab change event.</p>
  
  <p>Each tab has 15-20 input fields and I don't want to use ajax on each value change because it is slowing down my application significantly.</p>