2 Replies Latest reply on Sep 18, 2007 8:21 AM by j-pro

    reRender and focus this tab from this tab's form shows only

    j-pro

      Good afternoon again.

      I've decided to make a new thread for this problem.

      I have this:

      <rich:tabPanel switchType="client" style="background-color:#B5CEFD;width:100%">
       <rich:tab label="Date personale" style="background-color:#B5CEFD;width:100%" id="employee_tab">
       <h:form>
      
      ...
      
       <a4j:commandButton action="#{amBean.action4Employee}" value="Add" focus="employee_tab" reRender=":employee_tab,:jobs_tab,:educations_tab,:relatives_tab,:employeesTable">
       </a4j:commandButton>
      
       </h:form>
       </rich:tab>
      
      
      
       <rich:tab label="Starea civila si rudele" style="background-color: #B5CEFD;width:100%" id="relatives_tab">
       <h:form>
      
      ...
      
       <a4j:commandButton action="#{amBean.action4Relative}" value="Adauga rudele" focus="relatives_tab" reRender = "relativesTable">
       </a4j:commandButton>
       </h:form>
       </rich:tab>
      
      
      
       <rich:tab label="Educatie" style="background-color: #B5CEFD;width:100%" id="educations_tab">
       <h:form>
      
      ...
      
       <a4j:commandButton action="#{amBean.action4Education}" value="Adauga educatie" focus="educations_tab" reRender = "educationsTable">
       </a4j:commandButton>
       </h:form>
       </rich:tab>
      
      
      
       <rich:tab label="Munca" style="background-color: #B5CEFD;width:100%" focus="jobs_tab">
       <h:form>
      
      ...
      
       <a4j:commandButton action="#{amBean.action4Job}" value="Adauga munca" focus="jobs_tab" reRender = "jobsTable">
       </a4j:commandButton>
       </h:form>
       </rich:tab>
      </rich:tabPanel>



      And when I press on commandButton with action="#{amBean.action4Employee}"(in the very first h:form), everything works well, but on the page are only tabs captions, without tabs content. For sure the employee_tab is active(focus on it), but there is no its content. When I press once on the caption of this tab - it shows the content. Or I can switch to the other tab, then to this one - and it show content too.

      Why doesn't it show the content just after I press a4j:commandButton?