5 Replies Latest reply on Jan 11, 2012 10:33 AM by ravi j

    rich:tabpanel immediate true is stoping the dynamic load of tab content

    ravi j Newbie

      HI,

       

      I have following form with tabpanel(switch type set to ajax) which contains two tabs. I want to dynamically load the tab data every time user enters the tab. I have set immediate true on tabpanel to skip the validations when user moving to other tab. the same property(immediate) is blocking the tab1:firstname value to be updated with  latest value from the backing bean when user enters from tab2 to tab1.  Plz let me know if you have any work around for this problem.

       

      <h:form id="mainform" enctype="multipart/form-data">

            <rich:tabPanel  id="tabs" switchType="ajax"  immediate="true">

               <rich:tab header="tab1" id="tab1" name="tab1" onenter="reloadtab1();">

                  <rich:messages/>

                  <h:panelGrid columns="2">

                     <h:outputText value="name" />

                     <h:inputText id="firstname" value="#{testBean.firstname}"  required="true"/>

                  </h:panelGrid>                        

                </rich:tab>

                <rich:tab header="tab2" id="tab2" name="tab2">

                  <h:panelGrid columns="2">

                     <h:outputText value="name" />

                     <h:inputText id="secname" value="#{testBean.secname}"/>

                  </h:panelGrid> 

                </rich:tab>

           </rich:tabPanel>

      </h:form>

      <a4j:jsFunction name="reloadtab1" execute="@this" immediate="true" render="tab1" limitRender="true" actionListener="#{testBean.intialize}"/>