1 Reply Latest reply on Sep 19, 2012 3:42 PM by healeyb

    rich:tabPanel does not work after ajax request

    macoolio

      Hello,

      I have a strange problem with the rich:tabPanel in combination with an ajax request and a commandLink.

      After clicking the a4j:commandLink "Update" Button the rich:tabPanel is not switching anymore.

       

      The browser's console log says:

      new RichFaces.ui.TabPanel("j_id_5:panel1", ({ajax:{incId:"1"}, activeItem:"j_id_9", isKeepHeight:false, cycledSwitching:false})) is not a function

      at jsf.js.jsf:3682

       

      Example Code:

      <h:head>

      </h:head>

      <body>

                <h:form>

                          <a4j:commandLink value="Update" action="#{testBean.update}" render="contentDiv" />

       

                          <t:div id="contentDiv">

                                    <rich:tabPanel switchType="client" id="panel1">

       

                                              <rich:tab>

                                                        Tab1

                                                        <h:commandLink action="#{test.testAction}" />

                                              </rich:tab>

       

                                              <rich:tab>

                                                        Tab2

                                              </rich:tab>

       

                                    </rich:tabPanel>

                          </t:div>

                </h:form>

      </body>

       

      The very strange thing is when I remove the the h:commandLink in Tab1 the switching works fine after the ajax request.

      When I change the render attribute to "@all" it works too, but that would be a bad workaround.

       

      I use MyFaces 2.1.8 and Richfaces 4.3.0.M1.

       

      Any Ideas?

      Thanks.

        • 1. Re: rich:tabPanel does not work after ajax request
          healeyb

          It sounds like it might be worthwhile going back to the latest stable release, perhaps after logging an issue

          https://issues.jboss.org/browse/RF. I had a quick look but see nothing that seems to match.

           

           

          Regards,

          Brendan.

           

           

           


          Freelance Java Enterprise Developer


          JSF Richfaces Ajax Java 6/7 (scjp) EE 6 HTML CSS JavaScript jQuery MySQL JPA Hibernate Eclipselink

          Spring Oracle SQL JPQL Sybase EJB CDI Glassfish Apache JAX-RS Primefaces UNIX Paypal and more..