2 Replies Latest reply on Sep 17, 2007 2:55 PM by j-pro

    reRender FROM this tab FOR a next one - possible?

    j-pro

      Good afternoon.

      Faced one problem...

      I have:

      <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>



      But when I press on commandButton with action="#{amBean.action4Employee}"(in the very first h:form), the server logs:
      18:23:34,163 WARN [AjaxContext] Target component for id jobs_tab not found



      I assume that it's because jobs_tab is next to employee_tab(from which I try to reRender), and it can't find jobs_tab simply because it wasn't loaded yet. But maybe I'm wrong and there is an easy solution. Is it? How can I make RichFaces reRender information in the next tabs?

      Thank you very much in advance.