title: CommandButton Onclick inside tab always takes me to first tab Primefaces
body: <p>Below is my code. Here the CommandButton action is not working and always moving the first
  tab.</p>
  
  <pre><code>&lt;h:head&gt;
      &lt;title&gt;Alert Input&lt;/title&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;h1 style="margin: auto;text-align: center"&gt;Fraud Alert Admin Page&lt;/h1&gt;
      &lt;p:separator style="height:5px;background-color:black;"/&gt;
      &lt;p:tabView id="tabs"&gt;
          &lt;p:tab id="alertInput" title="Enter Alert"&gt;
              &lt;h:form&gt;
                  &lt;p:growl id="submitMessage" showDetail="true" sticky="true"/&gt;
                  &lt;p:panel id="alertPanel"&gt;
                      &lt;p:panelGrid columns="2" style="margin-bottom:10px"&gt;
                          &lt;p:outputLabel for="sevLevel" value="Sev:" /&gt;
                          &lt;p:selectOneMenu id="sevLevel" required="true" value="#{alertInputBean.alertSev}"&gt;
                              &lt;f:selectItem itemLabel="Informational" itemValue="1"/&gt;
                              &lt;f:selectItem itemLabel="Warning" itemValue="2"/&gt;
                              &lt;f:selectItem itemLabel="Urgent" itemValue="3"/&gt;
                              &lt;f:selectItem itemLabel="Severe" itemValue="4"/&gt;
                          &lt;/p:selectOneMenu&gt;
                          &lt;p:outputLabel for="alertName" value="Alert Name:"/&gt;
                          &lt;p:inputText id="alertName" required="true" label="Alert Name" value="#{alertInputBean.alertName}"/&gt;
                          &lt;p:outputLabel for="alertDescription" value="Alert Description:"/&gt;
                          &lt;p:inputText id="alertDescription" required="true" label="Description" value="#{alertInputBean.alertDesc}"/&gt;
                      &lt;/p:panelGrid&gt;
                      &lt;p:toolbar&gt;
                          &lt;f:facet name="left"&gt;
                              &lt;p:commandButton value="submit" actionListener="#{alertInputBean.submitAlert()}"
                                               update="submitMessage" ajax="false"&gt;
                              &lt;/p:commandButton&gt;
                          &lt;/f:facet&gt;
                          &lt;f:facet name="right"&gt;
                              &lt;h:commandButton value="Reset"&gt;
                                  &lt;p:ajax update="alertPanel" resetValues="true"/&gt;
                              &lt;/h:commandButton&gt;
                          &lt;/f:facet&gt;
                      &lt;/p:toolbar&gt;
                  &lt;/p:panel&gt;
              &lt;/h:form&gt;
          &lt;/p:tab&gt;
          &lt;p:tab id="alertExisting" title="Current Alerts"&gt;
              &lt;h:form id="form"&gt;
                  &lt;p:dataTable id="allAlerts" var="alerts" 
                               value="#{alertInputBean.retrieveAllAlerts()}"
                               emptyMessage="No alerts found with the given criteria."
                               selection="#{alertInputBean.selectedAlerts}" 
                               rowKey="#{alerts.alertName}" scrollable="true" scrollHeight="250"&gt;
                      &lt;f:facet name="header"&gt;
                          Current Alerts
                      &lt;/f:facet&gt;
                      &lt;p:column selectionMode="multiple" style="width:16px;text-align:center"/&gt;
                      &lt;p:column headerText="Alert Severity"&gt;
                          &lt;h:outputText value="#{alerts.sev}"/&gt;
                      &lt;/p:column&gt;
                      &lt;p:column headerText="Alert Name"&gt;
                          &lt;h:outputText value="#{alerts.alertName}"/&gt;
                      &lt;/p:column&gt;
                      &lt;p:column headerText="Alert Description"&gt;
                          &lt;h:outputText value="#{alerts.descrption}"/&gt;
                      &lt;/p:column&gt;
                      &lt;p:column headerText="Creation Date"&gt;
                          &lt;h:outputText value="#{alerts.createDate}"/&gt;
                      &lt;/p:column&gt;
                      &lt;p:column headerText="Modify Date"&gt;
                          &lt;h:outputText value="#{alerts.modifyDate}"/&gt;
                      &lt;/p:column&gt;
                      &lt;p:column headerText="Enabled"&gt;
                          &lt;h:outputText value="#{alerts.enabled}"/&gt;
                      &lt;/p:column&gt;
                      &lt;f:facet name="footer"&gt;
                          &lt;p:commandButton process="@this" value="Update" icon="ui-icon-search" 
                                           update=":tabs:form:multiAlertUpdate" onclick="PF('multiAlertDialog')show()"/&gt;
                      &lt;/f:facet&gt;
                  &lt;/p:dataTable&gt;
                  &lt;p:dialog header="Update Selected" widgetVar="multiAlertDialog" modal="true" showEffect="fade" hideEffect="fade" resizable="false" width="200"&gt;
                      &lt;p:outputPanel id="multiAlertUpdate" style="text-align: center"&gt;
                          &lt;ui:repeat value="#{alertInputBean.selectedAlerts}" var="sAlerts"&gt;
                              &lt;p:outputLabel value="#{sAlerts.sev}-#{sAlerts.alertName}" style="display: block"/&gt;
                          &lt;/ui:repeat&gt;
                      &lt;/p:outputPanel&gt;
                  &lt;/p:dialog&gt;                 
              &lt;/h:form&gt;
          &lt;/p:tab&gt;
      &lt;/p:tabView&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Below is the XHTML
  I have the above code. The problem is whenever I click on the commandbutton I am redirected to the first tab. Intended onClick is not at all working.</p>