6 Replies Latest reply on Apr 4, 2007 8:10 AM by ilya_shaikovsky

    question about rich:tabpanel

    liuliu

      hello everyone,

      i have a simple example with rich:tabpanel:

      <rich:tabPanel id="pagePatient" switchType="ajax">
      <my:Onglet onglet="#{DataTableDossierPatient}">
      some text
      </my:onglet>
      <my:Onglet onglet="#{parameter}">
      <ui:include src="./a.xhtml">
      </my:onglet>
      </rich:tabpanel>

      here is my:onglet:

      <c:if test="${not (empty onglet)}">
      <rich:tab label="#{onglet.libelle}" action="#{onglet.actionOnglet}" disabled="#{onglet.disable}" rendered="#{onglet.visible}">
      <ui:insert />
      </rich:tab>
      </c:if>

      this works when swich mode is client, it does not work when switch mode is ajax. i cant switch between tabs. just like some valide error.

      but when i replace <ui:include > with some text. it works too in mode ajax. i dont know it comes from facelet (i m new for it) or richface.

      any idea

      thanks in advance

      liumin

        • 1. Re: question about rich:tabpanel
          ilya_shaikovsky

          You should not use JSTL tags if you want such behaviour in ajax Mode. On the ajax request - JSTL expressions isn't recalculated and may cause some problems. User "rendered" attribute pointed to session scoped variable instead.

          • 2. Re: question about rich:tabpanel
            liuliu


            thanks for your response.

            i removed c:if in taglib of my:onglet accord to your suggestion, but nothing changed. I think the problem maybe come from richface, for that i made a example simpler, no backing bean and jstl,two pages test.xhtml and test2.xhtml, in ajax mode, i can switch between tab 1 and tab 3, but cant switch to tab 2 with a <ui:include />. in a4j:log, i have a xml parse error when click to tab2.

            a bug or my fault in facelet?



            test.xhtml

            <?xml version="1.0" ?>
            <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
            xmlns:rich="http://richfaces.ajax4jsf.org/rich">


            title




            <rich:tabPanel switchType="ajax">
            <rich:tab label="First">
            Here is tab #2
            </rich:tab>
            <rich:tab label="Second">
            <ui:include src="test2.xhtml" />
            </rich:tab>
            <rich:tab label="Third">
            Here is tab #4
            </rich:tab>
            </rich:tabPanel>
            <a4j:log level="ALL" popup="false" width="400" height="200"/>



            test2.xhtml

            <?xml version="1.0" ?>
            <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html">

            <h:outputText value="bbb" />




            • 3. Re: question about rich:tabpanel
              liuliu

              all html tag are removed by editor in the last post, retry here

              test.xhtml

              <?xml version="1.0" ?>
              <html xmlns="http://www.w3.org/1999/xhtml"
               xmlns:ui="http://java.sun.com/jsf/facelets"
               xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
               xmlns:rich="http://richfaces.ajax4jsf.org/rich">
              
               <head>
               <title>title</title>
               </head>
              
              
               <body>
              <rich:tabPanel switchType="ajax">
               <rich:tab label="First">
               Here is tab #2
               </rich:tab>
               <rich:tab label="Second">
               <ui:include src="test2.xhtml" />
               </rich:tab>
               <rich:tab label="Third">
               Here is tab #4
               </rich:tab>
              </rich:tabPanel>
               <a4j:log level="ALL" popup="false" width="400" height="200"/>
               </body>
              </html>
              


              test2.html
              <?xml version="1.0" ?>
              <html xmlns="http://www.w3.org/1999/xhtml"
               xmlns:h="http://java.sun.com/jsf/html">
              
               <h:outputText value="bbb" />
              
              </html>
              
              


              • 4. Re: question about rich:tabpanel
                ilya_shaikovsky

                Yes seems like a bug.. Now I'm able to see unexpected elements in responce. Work will started under the component. Thanks for your feedback.

                • 5. Re: question about rich:tabpanel
                  liuliu

                  hi,

                  I find the same problem with rich:togglepanel. is this problem fixed in 3.0.1 snapshot?

                  thanks

                  liu

                  • 6. Re: question about rich:tabpanel
                    ilya_shaikovsky

                    Tab Panel bug doesn't appears for my environment using 3.0.1 snapshot.

                    As for toggle panel and simple toggle panel - seems like bug is the same - http://jira.jboss.com/jira/browse/RF-65