title: I include ajax based page in prime faces tab but it not work properly
body: <p>I have included pages in prime faces tab. I have used id based form in each page. when I enable ajax for each page, then it is not working in the tab.</p>
  
  <p>My prime-face index.xhtml page is below.</p>
  
  <p><strong>index.xhtml</strong></p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
   &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
  &lt;ui:composition template="templet.xhtml"&gt;
      &lt;ui:define name="top"&gt;
          &lt;h1&gt;Qubit Student Management System&lt;/h1&gt;
      &lt;/ui:define&gt;
      &lt;ui:define name="content"&gt;       
          &lt;h:form id="menu"&gt;                
              &lt;p:menubar autoDisplay="true"&gt;
                  &lt;p:submenu id="admin" label="Admin"&gt;
                      &lt;p:submenu id="institute" label="Institute Setup"&gt;
                          &lt;p:menuitem id="addInstitute" value="Add Info" action="#{ajaxBean.editAction}" ajax="true"  update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="InstituteInformation"/&gt;
                          &lt;/p:menuitem&gt;
  
                          &lt;p:menuitem id="viewInstitute" value="View Info" action="#{ajaxBean.editAction}" ajax="true"  update=":outputForm"&gt;
                          &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="InstituteView"/&gt;
                          &lt;/p:menuitem&gt;
                          &lt;p:menuitem id="editInstitute" value="Edit Info" action="#{ajaxBean.editAction}" ajax="true"  update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="InstituteEdit"/&gt;
                          &lt;/p:menuitem&gt;
                      &lt;/p:submenu&gt;
  
  
                      &lt;p:submenu id="campus" label="Campus Setup"&gt;
                          &lt;p:menuitem id="addCampus" value="Add Campus" ajax="true" update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="CampusInformation"/&gt;                                
                          &lt;/p:menuitem&gt;
                          &lt;p:menuitem id="viewCampus" value="View Campus" ajax="true" update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="CampusList"/&gt;
                          &lt;/p:menuitem&gt;
                          &lt;p:menuitem id="editCampus" value="Edit Campus" ajax="true" update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="CampusEdit"/&gt;
                          &lt;/p:menuitem&gt;
                      &lt;/p:submenu&gt;
  
  
                      &lt;p:submenu id="department" label="Department Setup"&gt;
                          &lt;p:menuitem id="addDepartment" value="Add Department" ajax="true" update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="DepartmentInformation"/&gt;
                          &lt;/p:menuitem&gt;
                          &lt;p:menuitem id="viewDepartment" value="View Department" ajax="true" update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="DepartmentList"/&gt;
                          &lt;/p:menuitem&gt;
                          &lt;p:menuitem id="editDepartment" value="Edit Department" ajax="true" update=":outputForm"&gt;
                              &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="DepartmentEdit"/&gt;
                          &lt;/p:menuitem&gt;
                      &lt;/p:submenu&gt;
                  &lt;/p:submenu&gt;
  
                  &lt;p:submenu id="student" label="Student"&gt;
                      &lt;p:menuitem id="studentAdd" value="Student Add" action="#{ajaxBean.editAction}" ajax="true"  update=":outputForm"&gt;
                          &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="StudentAdd"/&gt;                                 
                      &lt;/p:menuitem&gt;
                      &lt;p:menuitem id="studentList" value="Student List" action="#{ajaxBean.editAction}" ajax="true" update=":outputForm"&gt;
                          &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="StudentList" /&gt;
                      &lt;/p:menuitem&gt;
                      &lt;p:menuitem id="studentAdmission" value="Student Admission" action="#{ajaxBean.editAction}" ajax="true" update=":outputForm"&gt;
                          &lt;f:setPropertyActionListener target="#{ajaxBean.action}" value="StudentAdmission" /&gt;
                      &lt;/p:menuitem&gt;
                  &lt;/p:submenu&gt;
              &lt;/p:menubar&gt;
          &lt;/h:form&gt;       
          &lt;h:form id="outputForm"&gt;
              &lt;p:tabView id="outputTab"&gt;
                  &lt;p:ajax event="tabClose" listener="#{ajaxBean.closeTab}"/&gt;
                  &lt;c:forEach items="#{ajaxBean.chcekItem}" var="item" varStatus="loop"&gt;
                      &lt;p:tab id="#{item}" title="#{item}" closable="true"&gt;                            
                          &lt;ui:include src="#{bundle[item]}"/&gt;   
  
                      &lt;/p:tab&gt;
                  &lt;/c:forEach&gt;
              &lt;/p:tabView&gt;
          &lt;/h:form&gt; 
          &lt;a href="menuIteams.xhtml"&gt;Template&lt;/a&gt;
      &lt;/ui:define&gt;
      &lt;ui:define name="bottom"&gt;
          &lt;h2 class="center"&gt;QubitLab Limited&lt;/h2&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p></p>
  
  <p>other some page below.</p>
  
  <p><strong>institute/Create.xhtml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"&gt;
  
  &lt;ui:composition template="/template.xhtml"&gt;
      &lt;ui:define name="title"&gt;
          &lt;h:outputText value="#{bundle.InstituteInfo}"&gt;&lt;/h:outputText&gt;
      &lt;/ui:define&gt;
      &lt;ui:define name="body"&gt;
  
          &lt;h:form id="institutesetupform"&gt;
              &lt;h:panelGroup id="messagePanel" layout="block"&gt;
                  &lt;h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/&gt;
              &lt;/h:panelGroup&gt;
              &lt;h:panelGrid columns="2"&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_instituteCode}" for="instituteCode" /&gt;
                  &lt;h:inputText id="instituteCode" value="#{instituteController.selected.instituteCode}" title="#{bundle.CreateInstituteTitle_instituteCode}" required="true" requiredMessage="#{bundle.CreateInstituteRequiredMessage_instituteCode}"/&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_instituteName}" for="instituteName" /&gt;
                  &lt;h:inputText id="instituteName" value="#{instituteController.selected.instituteName}" title="#{bundle.CreateInstituteTitle_instituteName}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_location}" for="location" /&gt;
                  &lt;h:inputText id="location" value="#{instituteController.selected.location}" title="#{bundle.CreateInstituteTitle_location}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_phone}" for="phone" /&gt;
                  &lt;h:inputText id="phone" value="#{instituteController.selected.phone}" title="#{bundle.CreateInstituteTitle_phone}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_email}" for="email" /&gt;
                  &lt;h:inputText id="email" value="#{instituteController.selected.email}" title="#{bundle.CreateInstituteTitle_email}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_fax}" for="fax" /&gt;
                  &lt;h:inputText id="fax" value="#{instituteController.selected.fax}" title="#{bundle.CreateInstituteTitle_fax}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_web}" for="web" /&gt;
                  &lt;h:inputText id="web" value="#{instituteController.selected.web}" title="#{bundle.CreateInstituteTitle_web}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_about}" for="about" /&gt;
                  &lt;h:inputTextarea rows="4" cols="30" id="about" value="#{instituteController.selected.about}" title="#{bundle.CreateInstituteTitle_about}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_mission}" for="mission" /&gt;
                  &lt;h:inputTextarea rows="4" cols="30" id="mission" value="#{instituteController.selected.mission}" title="#{bundle.CreateInstituteTitle_mission}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_vision}" for="vision" /&gt;
                  &lt;h:inputTextarea rows="4" cols="30" id="vision" value="#{instituteController.selected.vision}" title="#{bundle.CreateInstituteTitle_vision}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateInstituteLabel_scop}" for="scop" /&gt;
                  &lt;h:inputTextarea rows="4" cols="30" id="scop" value="#{instituteController.selected.scop}" title="#{bundle.CreateInstituteTitle_scop}" /&gt;
              &lt;/h:panelGrid&gt;
              &lt;br /&gt;
              &lt;h:commandButton action="#{instituteController.create}" value="#{bundle.CreateInstituteSaveLink}"&gt;
                  &lt;f:ajax execute="institutesetupform" render="institutesetupform:messagePanel"/&gt;
              &lt;/h:commandButton&gt;
  
              &lt;br /&gt;
  
          &lt;/h:form&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>department/Create.xhtml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"&gt;
  
  &lt;ui:composition template="/template.xhtml"&gt;
      &lt;ui:define name="title"&gt;
          &lt;h:outputText value="#{bundle.CreateDepartmentTitle}"&gt;&lt;/h:outputText&gt;
      &lt;/ui:define&gt;
      &lt;ui:define name="body"&gt;
  
          &lt;h:form id="departmentsetupform"&gt;
              &lt;h:panelGroup id="messagePanel" layout="block"&gt;
                  &lt;h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/&gt;
              &lt;/h:panelGroup&gt;
              &lt;h:panelGrid columns="2"&gt;
                  &lt;h:outputLabel value="#{bundle.CreateDepartmentLabel_departmentId}" for="departmentId" /&gt;
                  &lt;h:inputText id="departmentId" value="#{departmentController.selected.departmentId}" title="#{bundle.CreateDepartmentTitle_departmentId}" required="true" requiredMessage="#{bundle.CreateDepartmentRequiredMessage_departmentId}"/&gt;
                  &lt;h:outputLabel value="#{bundle.CreateDepartmentLabel_departmentName}" for="departmentName" /&gt;
                  &lt;h:inputText id="departmentName" value="#{departmentController.selected.departmentName}" title="#{bundle.CreateDepartmentTitle_departmentName}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateDepartmentLabel_history}" for="history" /&gt;
                  &lt;h:inputText id="history" value="#{departmentController.selected.history}" title="#{bundle.CreateDepartmentTitle_history}" /&gt;
                  &lt;h:outputLabel value="#{bundle.CreateDepartmentLabel_program}" for="program" /&gt;
                  &lt;h:inputText id="program" value="#{departmentController.selected.program}" title="#{bundle.CreateDepartmentTitle_program}" /&gt;
              &lt;/h:panelGrid&gt;
              &lt;br /&gt;
              &lt;h:commandButton action="#{departmentController.create}" value="#{bundle.CreateDepartmentSaveLink}" &gt;
                  &lt;f:ajax execute="departmentsetupform" render="departmentsetupform:messagePanel"/&gt;
          &lt;/h:commandButton&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;h:commandButton action="#{departmentController.prepareList}" value="#{bundle.CreateDepartmentShowAllLink}" immediate="true"/&gt;
          &lt;br /&gt;
  
      &lt;/h:form&gt;
  &lt;/ui:define&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p>when run every those page individually ajax can found form id but when i include those pages in <strong>index.xhtml</strong> page tab by clicking on <strong>menu item</strong> then it show </p>
  
  <pre><code>&lt;f:ajax&gt; contains an unknown id 'departmentsetupform' - cannot locate it in the context of the component j_idt266
  </code></pre>
  
  <p>any one here help me for this regard.. </p>